我不知道是什么导致了这个问题,我试着从零开始卸载和重新安装所有的东西,但经过两天的尝试,我仍然无法解决这个问题。我真的需要一些专家的帮助。
我是不是错过了一些最基本的东西?
在我的桌面上,我运行的是Windows 10,在我的笔记本电脑上,我运行的是Windows 7(专业版,SP1)。
在桌面上,I pipenv to install django==1.11,pip freeze显示列出的django==1.11。在我的笔记本电脑上,使用pipenv to install django==1.10,但是pip freeze 没有列出django。当我检查pipfile.lock时,我看到django列在那里。
这是我笔记本电脑上的日志,这样您就可以看到我使用过的所有命令(万一我漏掉了一个):
PS C:\Project> pipenv安装django==1.11
Creating a virtualenv for this project.
Using C:\Python27\python.exe to create virtualenv.
Running virtualenv with interpreter C:\Python27\python.exe
New python executable in C:\Project\Scri...
xe
Installing setuptools, pip, wheel...done.
Virtualenv location: C:\Project\
Installing django==1.10.
Collecting django==1.10
Using cached Django-1.10-py2.py3-none-any.whl
Installing collected packages: django
Successfully installed django-1.10
Adding django==1.10 to Pipfile's [packages]
Locking [dev-packages] dependencies.
Locking [packages] dependencies.
Updated Pipfile.lock (93acb4)!PS C:\Projects>猫文件
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[dev-packages]
[packages]
django = "==1.10"PS C:\Project>猫pipfile.lock
{
"_meta": {
"hash": {
"sha256": "92bc94ea06d9cf8e2f7b9ed1628d1036db1bce0bb20f920009e9f6dba093acb4"
},
"host-environment-markers": {
"implementation_name": "cpython",
"implementation_version": "0",
"os_name": "nt",
"platform_machine": "AMD64",
"platform_python_implementation": "CPython",
"platform_release": "7",
"platform_system": "Windows",
"platform_version": "6.1.7601",
"python_full_version": "2.7.14",
"python_version": "2.7",
"sys_platform": "win32"
},
"pipfile-spec": 6,
"requires": {},
"sources": [
{
"name": "pypi",
"url": "https://pypi.python.org/simple",
"verify_ssl": true
}
]
},
"default": {
"django": {
"hashes": [
"sha256:9c60f4a801bf7c26bd6824c1062550c12c373344116703461c18cc258f8c9320",
"sha256:46b868d68e5fd69dd9e05a0a7900df91786097e30b2aa6f065dd7fa3b22f7005"
],
"version": "==1.10"
}
},
"develop": {}
}PS C:\Project> pip冷冻
backports.shutil-get-terminal-size==1.0.0
certifi==2018.1.18
chardet==3.0.4
configparser==3.5.0
enum34==1.1.6
flake8==3.5.0
idna==2.6
mccabe==0.6.1
pathlib==1.0.1
pew==1.1.2
pipenv==9.0.3
psutil==5.3.1
pycodestyle==2.3.1
pyflakes==1.6.0
requests==2.18.4
shutilwhich==1.1.0
urllib3==1.22
virtualenv==15.1.0
virtualenv-clone==0.2.6PS C:\Project> django-admin startporject项目
The term 'django-admin' is not recognized as the name of a cmdlet, function, script file, or operable program. Check th
e spelling of the name, or if a path was included, verify that the path is correct and try again.我试过禁用Avast (每当我安装了一个新的软件包时,它总是弹出一个“等待而我们扫描”的通知)。
在日志开始时,我确实注意到了Using cached Django-1.10-py2.py3-none-any.whl --是否应该尝试清除缓存(以防该包损坏)并重试?
我是不是在做傻事?如果没有,我如何着手找出问题是什么,以便我能够解决它?
发布于 2018-02-26 12:11:05
听起来你还没有激活虚拟环境--试试pipenv shell然后django-admin ...
https://stackoverflow.com/questions/48823302
复制相似问题