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
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
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
ModuleNotFoundError: No module named 'pip'