I want to install ERPNext on a VM (Compute Engine, Ubuntu 18.04). I used the “Easy Install Script” from Github.
sudo apt-get install python3-minimal build-essential python3-setuptools
export LC_ALL=C.UTF-8
wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
sudo python3 install.py --production
However frappe-web fails to start. Here is the log:
Traceback (most recent call last):
File "/home/frappe/frappe-bench/env/bin/gunicorn", line 8, in <module>
sys.exit(run())
File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 58, in run
WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/gunicorn/app/base.py", line 228, in run
super().run()
File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/gunicorn/app/base.py", line 72, in run
Arbiter(self).run()
File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/gunicorn/arbiter.py", line 58, in __init__
self.setup(app)
File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/gunicorn/arbiter.py", line 118, in setup
self.app.wsgi()
File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
return self.load_wsgiapp()
File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
return util.import_app(self.app_uri)
File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/gunicorn/util.py", line 358, in import_app
mod = importlib.import_module(module)
File "/home/frappe/frappe-bench/env/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 13, in <module>
from werkzeug.contrib.profiler import ProfilerMiddleware
ModuleNotFoundError: No module named 'werkzeug.contrib'
When I access the page from the browser, I get the 502 Bad Gateway response (Sorry!
We will be back soon.)
The very strange part is, that I used the exact same commands on the exact same host OS on a different VM a few days ago and it just worked perfectly. The checksum of the install script are the same as well as the bench, frappe and ERPNext versions. I tried manually installing “Werkzeug” via pip, which also didn’t help.