首页 新闻 会员 周边 捐助

python 启动报如下错误

-1
[已解决问题] 解决于 2019-12-25 14:40

D:\pydocment>pip list
Traceback (most recent call last):
File "d:\software\python\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "d:\software\python\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\SoftWare\python\Scripts\pip.exe__main__.py", line 5, in <module>
ModuleNotFoundError: No module named 'pip'

安装之后
D:\pydocment>python -m pip install --upgrade pip
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Requirement already up-to-date: pip in c:\users\pujo2.windows-build-tools\python27\lib\site-packages (19.3.1)

启动:

D:\pydocment>python "KPI Report.py"
Traceback (most recent call last):
File "KPI Report.py", line 3, in <module>
import pymongo
ImportError: No module named pymongo

在安装
D:\pydocment>pip install pymongo
Traceback (most recent call last):
File "d:\software\python\lib\runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "d:\software\python\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\SoftWare\python\Scripts\pip.exe__main__.py", line 5, in <module>
ModuleNotFoundError: No module named 'pip'

一支会记忆的笔的主页 一支会记忆的笔 | 菜鸟二级 | 园豆:280
提问于:2019-12-25 11:43
< >
分享
最佳答案
0

安装pip --问题解决
pip下载:https://bootstrap.pypa.io/get-pip.py 选中链接—右键—目标另存为—保存到Python安装路径。

pip安装:进入Python安装路径,打开cmd命令行,执行命令:python -m pip install pip

ModuleNotFoundError: No module named 'numpy'——安装numpy
https://blog.csdn.net/qq_36471860/article/details/79386374

一支会记忆的笔 | 菜鸟二级 |园豆:280 | 2019-12-25 14:39
其他回答(1)
0

pip 都没有,尝试从官网下载msi安装包然后重新安装,建议使用python3.6+

ChnMig | 园豆:421 (菜鸟二级) | 2019-12-25 14:24

thx

支持(0) 反对(0) 一支会记忆的笔 | 园豆:280 (菜鸟二级) | 2019-12-25 14:43
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册