赞
踩
我正在运行Win10 64位,尝试安装python3.7并升级pip。
我将python安装在d:\python\python372-64(在python文件夹中还有其他版本的python)。
pip应该和python 3一起提供。当我奔跑
pip install pip --upgrade
它说
Found existing installation: pip 18.1
但是
Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'd:\\python\\python372-64\\scripts\\pip.exe'. Consider using the '--user' option or check the permissions.'
因此,我尝试以管理员身份运行,但它给了我以下错误:
Traceback (most recent call last):
File "d:\python\python372-64\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "d:\python\python372-64\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\Python\Python372-64\Scripts\pip.exe\__main__.py", line 5, in
ModuleNotFoundError: No module named 'pip'
但是,如果我跑步
python -m ensurepip
我明白这一点:
Looking in links: C:\Users\jd\AppData\Local\Temp\tmpcww44m60
Requirement already satisfied: setuptools in d:\python\python372-64\lib\site-packages (40.6.2)
Collecting pip
Installing collected packages: pip
Successfully installed pip-18.1
另外,下面是我的路径环境变量:
D:\Python\Python372-64
D:\Python\Python372-64\Lib\site-packages\
D:\Python\Python372-64\Scripts
我该怎么做才能解决这个问题?
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。