Bench update: `requests` distribution was not found

I have updated the version of erpnext and now it is not working after the update it was not making updates and decided to restart it, after that not working at all it seems.

I get

We will be back soon.

Also if i try to update it again i get this error

run bench update and report any errors you find.

1 Like

Thank you for your fast answer, this are the errors from update:

Any news about this problem? :frowning: Still not working after restarts


It seems the requests package is not installed run the below command from frappe-bench directory to install the package

./env/bin/pip install requests or bench update --requirements

The error for ./env/bin/pip install requests is this one

@makarand_b and for the second one this:

if you have a node_modules folder in your bench, delete it and run

bench setup requirements again

Also please paste your trace not share a screenshot.

Ok now this is shown

frappe@erpnext:~/frappe-bench$ bench setup requierements
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 6, in
from pkg_resources import load_entry_point
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/”, line 3037, in
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/”, line 3021, in _call_aside
f(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/”, line 3050, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/”, line 655, in _build_master
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/”, line 969, in require
needed = self.resolve(parse_requirements(requirements))
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/”, line 855, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The ‘requests’ distribution was not found and is required by bench

run sudo pip install requests

edit: make sure you have internet access to your VM!

@rmehta it did the install, it is internet because I can find the server and it gives the error

We will be back soon.

Don’t panic. It’s not you, it’s us.
Most likely, our engineers are updating the code, and it should take a minute for the new code to load into memory.

Try refreshing after a minute or two.
, now the part with the install went ok and the tried again bench update and it throwed this error (i mention that I use the VM from the site)

Last login: Thu Jul 6 04:07:26 2017
frappe@erpnext:~$ cd frappe-bench\

frappe@erpnext:~/frappe-bench$ bench update
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up-to-date.
remote: Counting objects: 704, done.
remote: Compressing objects: 100% (26/26), done.
remote: Total 704 (delta 601), reused 613 (delta 595), pack-reused 82
Receiving objects: 100% (704/704), 172.90 KiB | 0 bytes/s, done.
Resolving deltas: 100% (610/610), completed with 385 local objects.
From GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript
b3fe27d…a93acd8 master → upstream/master
f2c9fd2…a93acd8 develop → upstream/develop
76146b9…9f1e3b2 gh-pages → upstream/gh-pages

  • [new tag] v8.3.0 → v8.3.0
    INFO:bench.utils:./env/bin/pip install Pillow
    Traceback (most recent call last):
    File “./env/bin/pip”, line 7, in
    from pip import main
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/”, line 21, in
    from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/requests/”, line 62, in
    from .packages.urllib3.exceptions import DependencyWarning
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/”, line 29, in
    import urllib3
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/”, line 8, in
    from .connectionpool import (
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/”, line 29, in
    from .connection import (
    File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/urllib3/”, line 2, in
    import datetime
    ImportError: No module named datetime
    Please install these dependencies using the command:
    sudo apt-get install -y libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
    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/”, line 40, in cli
    File “/usr/local/lib/python2.7/dist-packages/click/”, line 722, in call
    return self.main(*args, **kwargs)
    File “/usr/local/lib/python2.7/dist-packages/click/”, line 697, in main
    rv = self.invoke(ctx)
    File “/usr/local/lib/python2.7/dist-packages/click/”, line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/usr/local/lib/python2.7/dist-packages/click/”, line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “/usr/local/lib/python2.7/dist-packages/click/”, line 535, in invoke
    return callback(*args, **kwargs)
    File “/home/frappe/bench-repo/bench/commands/”, line 62, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force, reset=reset)
    File “/home/frappe/bench-repo/bench/commands/”, line 76, in _update
    before_update(bench_path=bench_path, requirements=requirements)
    File “/home/frappe/bench-repo/bench/”, line 696, in before_update
    validate_pillow_dependencies(bench_path, requirements)
    File “/home/frappe/bench-repo/bench/”, line 704, in validate_pillow_dependencies
    exec_cmd(“{pip} install Pillow”.format(pip=pip))
    File “/home/frappe/bench-repo/bench/”, line 130, in exec_cmd
    raise CommandFailedError(cmd)
    bench.utils.CommandFailedError: ./env/bin/pip install Pillow

I guess this is resolved – had the same issue and for me

$ sudo apt install python-requests

resolved the issue. The package was dropped after a dist-upgrade.