Forums

Manual setup with virtualenv python2.7 and django1.11, import error in /bin/user_wsgi_wrapper.py

File "/bin/user_wsgi_wrapper.py", line 28, in <module>

from datetime import datetime
ImportError

No module named datetime

I can't access the file through Bash or the file browser. The virtualenv has datetime installed.

[edit by admin: formatting]

Where are you seeing this error? Is it in your webapp error log?

.server.log of the web app.

Hmm, that's very weird -- datetime is a built-in module, you shouldn't need to install it.

How did you create the virtualenv? If it was on another machine, that might be the problem -- virtualenvs are not portable from machine to machine in general, you should create a fresh one on each machine you run your code on, and install the packages you need into it.