只是沒有從Ubuntu的升級12.10到13.04,並獲得在virtualenv中沒有模塊名稱日期時間13.04升級
(virtualenv)[email protected]:~/webapps/devsite/djangosite$ ./manage.py runserver
Traceback (most recent call last):
File "./manage.py", line 2, in <module>
from django.core.management import execute_manager
File "/home/sysadmin/webapps/devsite/virtualenv/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 7, in <module>
from django.core.management.base import BaseCommand, CommandError, handle_default_options
File "/home/sysadmin/webapps/devsite/virtualenv/local/lib/python2.7/site-packages/django/core/management/base.py", line 14, in <module>
from django.utils.encoding import smart_str
File "/home/sysadmin/webapps/devsite/virtualenv/local/lib/python2.7/site-packages/django/utils/encoding.py", line 4, in <module>
import datetime
ImportError: No module named datetime
現在不是13.04與Python 3?不確定這是否對舊版virtualenv有任何影響。 – CppLearner 2013-04-29 02:47:31
我的默認python是2.7.4 Python 2.7.4(默認2013年4月19日18:28:01) linux2上的[GCC 4.7.3] – 2013-04-29 03:20:21
你可以在控制檯中激活你的virtualenv後導入datetime嗎? – alecxe 2013-04-29 05:45:48