ModuleNotFoundError: No module named 'pip'
See original GitHub issueEnvironment
- pip version: 9.0.3
- Python version: 3.6
- OS: Windows Server 2016 Datacenter
Description My system admin installed Python 3.6 for me in my AWS workspace and i requested him to update the pip version to 18 but while he was trying to upgrade the version, he ran into error. All below-mentioned commands were executed from a Powershell window in Administrative mode:
Output
PS D:\python\3.6\scripts> pip install --upgrade pip
Collecting pip
Downloading https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940
/pip-18.0-py2.py3-none-any.whl (1.3MB)
100% |████████████████████████████████| 1.3MB 720kB/s
Installing collected packages: pip
Found existing installation: pip 9.0.3
Uninstalling pip-9.0.3:
Exception:
Traceback (most recent call last):
File "d:\python\3.6\lib\shutil.py", line 544, in move
os.rename(src, real_dst)
OSError: [WinError 17] The system cannot move the file to a different disk drive: 'd:\\python\\3.6\\scripts\\pip.exe' ->
'C:\\Users\\sdgadmin\\AppData\\Local\\Temp\\pip-o9ithn08-uninstall\\python\\3.6\\scripts\\pip.exe'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "d:\python\3.6\lib\site-packages\pip\basecommand.py", line 215, in main
File "d:\python\3.6\lib\site-packages\pip\commands\install.py", line 342, in run
File "d:\python\3.6\lib\site-packages\pip\req\req_set.py", line 778, in install
File "d:\python\3.6\lib\site-packages\pip\req\req_install.py", line 754, in uninstall
File "d:\python\3.6\lib\site-packages\pip\req\req_uninstall.py", line 115, in remove
File "d:\python\3.6\lib\site-packages\pip\utils\__init__.py", line 267, in renames
File "d:\python\3.6\lib\shutil.py", line 559, in move
os.unlink(src)
PermissionError: [WinError 5] Access is denied: 'd:\\python\\3.6\\scripts\\pip.exe'
PS D:\python\3.6\scripts> pip list
Traceback (most recent call last):
File "d:\python\3.6\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "d:\python\3.6\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\Python\3.6\Scripts\pip.exe\__main__.py", line 5, in <module>
ModuleNotFoundError: No module named 'pip'
PS D:\python\3.6\scripts> pip3 install --upgrade pip
Traceback (most recent call last):
File "d:\python\3.6\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "d:\python\3.6\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\Python\3.6\Scripts\pip3.exe\__main__.py", line 5, in <module>
ModuleNotFoundError: No module named 'pip'
PS D:\python\3.6\scripts> pip3 install --upgrade pip3
Traceback (most recent call last):
File "d:\python\3.6\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "d:\python\3.6\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\Python\3.6\Scripts\pip3.exe\__main__.py", line 5, in <module>
ModuleNotFoundError: No module named 'pip'
PS D:\python\3.6\scripts> pip install --upgrade pip
Traceback (most recent call last):
File "d:\python\3.6\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "d:\python\3.6\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\Python\3.6\Scripts\pip.exe\__main__.py", line 5, in <module>
ModuleNotFoundError: No module named 'pip'
PS D:\python\3.6\scripts> pip.exe install --upgrade pip
Traceback (most recent call last):
File "d:\python\3.6\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "d:\python\3.6\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\Python\3.6\Scripts\pip.exe\__main__.py", line 5, in <module>
ModuleNotFoundError: No module named 'pip'
Are we doing something wrong here? I also checked few links that suggested using easy_install. I tried that as well but ran into issues.
PS D:\python\3.6\scripts> .\easy_install.exe pip
Searching for pip
Reading https://pypi.python.org/simple/pip/
d:\python\3.6\lib\site-packages\setuptools\pep425tags.py:89: RuntimeWarning: Config variable 'Py_DEBUG' is unset, Python
ABI tag may be incorrect
warn=(impl == 'cp')):
d:\python\3.6\lib\site-packages\setuptools\pep425tags.py:93: RuntimeWarning: Config variable 'WITH_PYMALLOC' is unset, P
ython ABI tag may be incorrect
warn=(impl == 'cp')):
Downloading https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/p
ip-18.0-py2.py3-none-any.whl#sha256=070e4bf493c7c2c9f6a08dd797dd3c066d64074c38e9e8a0fb4e6541f266d96c
error: Download error for https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3
703d2ddaf940/pip-18.0-py2.py3-none-any.whl#sha256=070e4bf493c7c2c9f6a08dd797dd3c066d64074c38e9e8a0fb4e6541f266d96c: [SSL
: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833)
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
ImportError: No module named pip - python
I encountered the issue ModuleNotFoundError: No module named 'pip' when I created a new Python 3 virtual ...
Read more >[Fixed] ModuleNotFoundError: No module named 'pip'
How to Fix “ModuleNotFoundError: No module named 'pip'” in PyCharm · Open File > Settings > Project from the PyCharm menu. · Select...
Read more >No Module Named Pip - Python
Python 'no module named pip'. This error occurs when you attempt to import a module named 'pip' and Python cannot find it in...
Read more >ModuleNotFoundError: No module named 'pip' in Python
The Python "ModuleNotFoundError: No module named 'pip'" occurs when pip is not installed in our Python environment. To solve the error, ...
Read more >/usr/bin/python: No module named pip error when trying to ...
In Ubuntu, the pip module is not default-installed or default-available - it needs to be installed by running one of the following commands:....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Manually download it from your browser?
Yes, because you current installation is broken, I suggest re-installing from get-pip.py.