[Answer]-ImportError: No module named os uwsgi + django + linux

1đź‘Ť

âś…

Assume you did need all your stuff running in Python2.7. Then you may try to re-install uwsgi with Python27 support:

sudo pip uninstall uwsgi

wget http://projects.unbit.it/downloads/uwsgi-latest.tar.gz
tar zxvf uwsgi-latest.tar.gz
cd <dir>
sudo python2.7 uwsgiconfig.py --plugin plugins/python core python27
make

Another possible solution: follow this guide to install pip2.7, then use pip2.7 to install everything (uwsgi, Django, …).
The guide also introduces virtualenv, it’s a strongly recommended tool for development with Python. As the name indicates, it creates separate “python package spaces”, so you can have different versions of Django or any Python packages in a computer, for different projects.

👤ZZY

Leave a comment