[Error] Bench Update No matching distribution found for virtualenv (from -r /home/frappe/bench-repo/requirements.txt)

Hello,

I was trying to upgrade from version 8 to version 9 and getting failure. Any pointer to resolve this error would be helpful.

Please find below terminal output.

frappe@DBFFS29:~/frappe-bench$ bench update
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up-to-date.
INFO:bench.utils:./env/bin/pip install Pillow
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages
Requirement already satisfied: olefile in ./env/lib/python2.7/site-packages (from Pillow)
INFO:bench.app:pulling frappe
INFO:bench.utils:git pull  upstream master
From https://github.com/frappe/frappe
 * branch            master     -> FETCH_HEAD
Already up-to-date.
INFO:bench.utils:find . -name "*.pyc" -delete
INFO:bench.app:pulling erpnext
INFO:bench.utils:git pull  upstream master
From https://github.com/frappe/erpnext
 * branch            master     -> FETCH_HEAD
Already up-to-date.
INFO:bench.utils:find . -name "*.pyc" -delete
Updating Python libraries...
INFO:bench.utils:./env/bin/pip install --upgrade pip
Could not fetch URL https://pypi.python.org/simple/pip/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILE                      D] certificate verify failed (_ssl.c:590) - skipping
Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
INFO:bench.utils:./env/bin/pip install -q -r /home/frappe/bench-repo/requirements.txt
  Could not find a version that satisfies the requirement virtualenv (from -r /home/frappe/bench-repo/requirements.txt (line 3)) (from vers                      ions: )
No matching distribution found for virtualenv (from -r /home/frappe/bench-repo/requirements.txt (line 3))
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 11, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/home/frappe/bench-repo/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/bench-repo/bench/commands/update.py", line 58, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, force=force, reset=reset)
  File "/home/frappe/bench-repo/bench/commands/update.py", line 74, in _update
    update_requirements(bench_path=bench_path)
  File "/home/frappe/bench-repo/bench/utils.py", line 406, in update_requirements
    install_requirements(pip, bench_req_file)
  File "/home/frappe/bench-repo/bench/utils.py", line 446, in install_requirements
    exec_cmd("{pip} install -q -r {req_file}".format(pip=pip, req_file=req_file))
  File "/home/frappe/bench-repo/bench/utils.py", line 140, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: ./env/bin/pip install -q -r /home/frappe/bench-repo/requirements.txt
frappe@DBFFS29:~/frappe-bench$

`

jparikh a google search on this
"
Could not fetch URL https://pypi.python.org/simple/pip/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED
"
turned up these pointers if you have not tried them

python - pip issue installing almost any library - Stack Overflow

So for eg manually run this:

./env/bin/pip install --trusted-host --upgrade pip

or downgrade, a bad system time so fix that and so on.

Thanks @clarkej for quick help. I saw couple of search results regarding SSL Certificate but your link helps.
But now i stuck at

`INFO:bench.utils:./env/bin/pip install -q -r ./apps/frappe/requirements.txt
Command "python setup.py egg_info" failed with error code 1 in /home/frappe/frappe-bench/env/src/mysqlclient/
`

Complete log is as below:

frappe@DBFFS29:~/frappe-bench$ bench update
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up-to-date.
INFO:bench.utils:./env/bin/pip install Pillow
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages
Requirement already satisfied: olefile in ./env/lib/python2.7/site-packages (from Pillow)
INFO:bench.app:pulling frappe
INFO:bench.utils:git pull  upstream master
From https://github.com/frappe/frappe
 * branch            master     -> FETCH_HEAD
Already up-to-date.
INFO:bench.utils:find . -name "*.pyc" -delete
INFO:bench.app:pulling erpnext
INFO:bench.utils:git pull  upstream master
From https://github.com/frappe/erpnext
 * branch            master     -> FETCH_HEAD
Already up-to-date.
INFO:bench.utils:find . -name "*.pyc" -delete
Updating Python libraries...
INFO:bench.utils:./env/bin/pip install --upgrade pip
Could not fetch URL https://pypi.python.org/simple/pip/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) - skipping
Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
INFO:bench.utils:./env/bin/pip install -q -r /home/frappe/bench-repo/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/frappe/requirements.txt
Command "python setup.py egg_info" failed with error code 1 in /home/frappe/frappe-bench/env/src/mysqlclient/
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 11, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/home/frappe/bench-repo/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/bench-repo/bench/commands/update.py", line 58, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, force=force, reset=reset)
  File "/home/frappe/bench-repo/bench/commands/update.py", line 74, in _update
    update_requirements(bench_path=bench_path)
  File "/home/frappe/bench-repo/bench/utils.py", line 410, in update_requirements
    install_requirements(pip, req_file)
  File "/home/frappe/bench-repo/bench/utils.py", line 446, in install_requirements
    exec_cmd("{pip} install -q -r {req_file}".format(pip=pip, req_file=req_file))
  File "/home/frappe/bench-repo/bench/utils.py", line 140, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: ./env/bin/pip install -q -r ./apps/frappe/requirements.txt
frappe@DBFFS29:~/frappe-bench$

Also, tried this https://github.com/frappe/bench/issues/389 but no luck :frowning:

“But now i stuck at”

You’re almost there - I urge you to search up what to by yourself.

Just ask when you have exhausted all the posted advice here :slight_smile:

I am also trying to dig all the ways. Sure Thanks @clarkej :+1:

Resolved mysqlclient error by following https://github.com/frappe/mysqlclient-python

You may need to install the Python and MySQL development headers and libraries like so:

sudo apt-get install python-dev libmysqlclient-dev # Debian / Ubuntu

./env/bin/pip install mysqlclient

Got npm install error

Updating node libraries…
INFO:bench.utils:npm install
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning SELF_SIGNED_CERT_IN_CHAIN: request to https://registry.npmjs.org/chromedriver failed, reason: self signed certificate in certificate chain
npm WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code SELF_SIGNED_CERT_IN_CHAIN
npm ERR! errno SELF_SIGNED_CERT_IN_CHAIN
npm ERR! request to https://registry.npmjs.org/babel-preset-minify failed, reason: self signed certificate in certificate chain

npm ERR! A complete log of this run can be found in:
npm ERR! /home/frappe/.npm/_logs/2017-11-15T15_08_50_527Z-debug.log
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/frappe/bench-repo/bench/commands/update.py”, line 58, in update
_update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, force=force, reset=reset)
File “/home/frappe/bench-repo/bench/commands/update.py”, line 75, in _update
update_npm_packages(bench_path=bench_path)
File “/home/frappe/bench-repo/bench/utils.py”, line 442, in update_npm_packages
exec_cmd(‘npm install’, cwd=bench_path)
File “/home/frappe/bench-repo/bench/utils.py”, line 140, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: npm install

Resolution for above npm install error

npm config set strict-ssl false install

1 Like