【发布时间】:2019-05-05 15:41:33
【问题描述】:
嗨,我在 python 2.7 上挣扎了超过 12 个小时,我正在使用 python 3.7,所以出于某种原因我决定更改为 2.7,所以我卸载了 3.7 并安装了 2.7 但是激活虚拟环境后无法启动项目这个错误。 我完成了所有程序here,但我无法解决问题。 我后来尝试在虚拟环境之外安装django的奇怪事情似乎工作正常 但我认为这是不恰当的帮助
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\cipher>pip install virtualenv
Collecting virtualenv
Installing collected packages: virtualenv
Successfully installed virtualenv-16.5.0
C:\Users\cipher>virtualenv market
New python executable in C:\Users\cipher\market\Scripts\python.exe
Installing setuptools, pip, wheel...
done.
C:\Users\cipher>cd market
C:\Users\cipher\market> .\Scripts\activate
(market) C:\Users\cipher\market>pip install django==1.5.4
Collecting django==1.5.4
Installing collected packages: django
Successfully installed django-1.5.4
(market) C:\Users\cipher\market>django-admin.py startproject market
Traceback (most recent call last):
File "C:\Users\cipher\market\Scripts\django-admin.py", line 2, in <module>
from django.core import management
ImportError: No module named django.core
(market) C:\Users\cipher\market>
【问题讨论】:
-
我都试过了
-
为什么要安装超过六年的 Django 版本?
-
只是想跟上某个教程,即使最新版本也不起作用