Docker容器迁移后uWSGI运行报错"ImportError: No module named datetime"
在将Docker容器从主机A迁移到主机B之后,启动uwsgi服务后发现有报错
*** Operational MODE: preforking ***
Traceback (most recent call last):
File "./my_django_app/wsgi.py", line 12, in <module>
from django.core.wsgi import get_wsgi_application
File "/home/admin/venv2/lib/python2.7/site-packages/django/__init__.py", line 3, in <module>
from django.utils.version import get_version
File "/home/admin/venv2/lib/python2.7/site-packages/django/utils/version.py", line 3, in <module>
import datetime
ImportError: No module named datetime
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode **
*** Operational MODE: preforking ***
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***
*** Operational MODE: preforking ***
Traceback (most recent call last):
File "./my_django_app/wsgi.py", line 12, in <module>
from django.core.wsgi import get_wsgi_application
File "/home/admin/venv2/lib/python2.7/site-packages/django/__init__.py", line 3, in <module>
from django.utils.version import get_version
File "/home/admin/venv2/lib/python2.7/site-packages/django/utils/version.py", line 3, in <module>
import datetime
ImportError: No module named datetime
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***