pip install fail on Windows 10 because of the ill handling of the path str.
See original GitHub issueEnvironment
- pip version:
19.0.319.0.1 (python 3.7) - Python version: Python 3.7.3 from python.org
- OS: Windows10 Home 10.0.171314 build 17134
Description Any pip install fail with the “FileNotFoundError: [Errno 2] No such file or directory: ‘c:\users\path\to\python37\site-packages\pip-19.0.1.dist-info\{METADATA,RECORD}’”
I feel strange the base name of the path is in uppercase while the other part of the path is in lower case (exactly mistakes).
Expected behavior Do not convert the dirname part to lower case and success to install.
How to Reproduce
- Clean install Python 3.7.3 by using the executable install package on www.python.org
- run
pip install --upgrade pip
in the command prompt.
Output exampled
Kazuy
is my user name at the machine.
C:\Users\Kazuy>pip install --upgrade pip
Collecting pip
Using cached https://files.pythonhosted.org/packages/d8/f3/413bab4ff08e1fc4828dfc59996d721917df8e8583ea85385d51125dceff/pip-19.0.3-py2.py3-none-any.whl
Error checking for conflicts.
Traceback (most recent call last):
File "c:\users\kazuy\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2897, in _dep_map
return self.__dep_map
File "c:\users\kazuy\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2691, in __getattr__
raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\kazuy\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2888, in _parsed_pkg_info
return self._pkg_info
File "c:\users\kazuy\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2691, in __getattr__
raise AttributeError(attr)
AttributeError: _pkg_info
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\kazuy\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\commands\install.py", line 503, in _warn_about_conflicts
package_set, _dep_info = check_install_conflicts(to_install)
File "c:\users\kazuy\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\check.py", line 108, in check_install_conflicts
package_set, _ = create_package_set_from_installed()
File "c:\users\kazuy\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\operations\check.py", line 47, in create_package_set_from_installed
package_set[name] = PackageDetails(dist.version, dist.requires())
File "c:\users\kazuy\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2635, in requires
dm = self._dep_map
File "c:\users\kazuy\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2899, in _dep_map
self.__dep_map = self._compute_dependencies()
File "c:\users\kazuy\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2908, in _compute_dependencies
for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:
File "c:\users\kazuy\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2890, in _parsed_pkg_info
metadata = self.get_metadata(self.PKG_INFO)
File "c:\users\kazuy\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1410, in get_metadata
value = self._get(self._fn(self.egg_info, name))
File "c:\users\kazuy\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1522, in _get
with open(path, 'rb') as stream:
FileNotFoundError: [Errno 2] No such file or directory: 'c:\\users\\kazuy\\appdata\\roaming\\python\\python37\\site-packages\\pip-19.0.1.dist-info\\METADATA'
Installing collected packages: pip
Found existing installation: pip 19.0.1
Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'c:\\users\\kazuy\\appdata\\roaming\\python\\python37\\site-packages\\pip-19.0.1.dist-info\\RECORD'
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How do I fix "pip"? - Stack Overflow
First check whether pip installed or not , in command prompt try pip --version , you should get something like this - pip...
Read more >Pip Command Not Found on Windows: A Guide | Built In
A “pip: command not found” error occurs when you haven't properly installed the package installer for Python (pip) on your computer.
Read more >How to Add Python to PATH
A common fix for these problems is adding Python to the PATH environment variable. In this tutorial, you'll learn how to add Python...
Read more >pip install - pip documentation v22.3.1
Description#. Install packages from: PyPI (and other indexes) using requirement specifiers. VCS project urls. Local project directories.
Read more >Troubleshooting - Chocolatey Software Docs
Why does choco tab not work for me? ... This means the import failed during install/upgrade. Chocolatey does supply a warning when this...
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 FreeTop 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
Top GitHub Comments
It seems that I used old pip for some reason. I have no problem with the latest Python/pip set.
Thank you for Spending your precious time.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.