gpt4 book ai didi

python-2.7 - Django 1.4 导入错误 No module named apps

转载 作者:行者123 更新时间:2023-12-01 00:38:29 25 4
gpt4 key购买 nike

我在 Windows Server 2008 R2(64 位)上运行 django 应用程序。相同的应用程序在我的其他系统上运行良好,该系统具有 Windows 7 64 位。我实际上是在尝试将应用程序移动到另一台机器上。我正在使用 Python 2.7 和 django 1.4。 manage.py runserver 工作正常并且能够启动服务器。

0 errors found
Django version 1.4, using settings 'checkmeout.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
[11/Aug/2016 05:22:09] "GET /admin/ HTTP/1.1" 500 115256

尝试访问管理页面或来自 http://127.0.0.1/8000,I 的任何其他 URL 时我收到以下错误。
ImportError at /admin/
No module named apps
Request Method: GET
Request URL: http://127.0.0.1:8000/admin/
Django Version: 1.4
Exception Type: ImportError
Exception Value:
No module named apps
Exception Location: C:\Python27\lib\site- packages\django_extensions\admin\__init__.py in <module>, line 10
Python Executable: C:\Python27\python.exe
Python Version: 2.7.5
Python Path:
['C:\\HardwareReservation\\checkmeout2',
'C:\\Windows\\system32\\python27.zip',
'C:\\Python27\\DLLs',
'C:\\Python27\\lib',
'C:\\Python27\\lib\\plat-win',
'C:\\Python27\\lib\\lib-tk',
'C:\\Python27',
'C:\\Python27\\lib\\site-packages',
'C:/SoftwareServices/checkmeout']

pip freeze 的输出(在它不起作用的系统上)放在下面以防万一。
amqp==1.4.9
anyjson==0.3.3
billiard==3.3.0.23
celery==3.1.23
Django==1.4
django-apps==0.1.0
django-celery==3.1.17
django-extensions==1.7.1
djangorestframework==3.2.0
kombu==3.0.35
MySQL-python==1.2.4
pytz==2016.6.1
six==1.10.0
South==1.0.2
web.py==0.37

它工作的系统上的 pip 卡住如下:
amqp==1.4.9
anyjson==0.3.3
billiard==3.3.0.23
celery==3.1.23
Django==1.4
django-celery==3.1.17
django-extensions==1.6.7
kombu==3.0.35
MySQL-python==1.2.5
pysphere==0.1.7
python-ldap==2.4.25
pytz==2016.4
six==1.10.0
South==1.0.2
virtualenv==15.0.2

最佳答案

我遇到了类似的问题。尝试安装有效的旧版 django-extensions:

pip install django-extensions=="1.6.7"

关于python-2.7 - Django 1.4 导入错误 No module named apps,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38896609/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com