Repository navigation
Closed
Labels
Description
Issue
I'm trying to set up a pre-commit hook and got this bug.
pre-commit/pre-commit#1628
Describe what's the expected behaviour and what you're observing.
Using Python 3.8 (virtual environment), tried with pip 20.1.1 as well as pip 20.2.3. The error says .dist-info not found, I checked out the particular directory, that indeed is the case.

Expected should be a venv should be created
- OS: Windows
pip list: Tried making venv with pip 20.1.1 and 20.2.3- Python 3.8,
Output of the virtual environment creation
No issue in pip. I can use pip globally as well. Created venv using python3 -m venv env and this works fine
Make sure to run the creation with -vvv --with-traceback:
(env) D:\Mac\Sites\project-reconnaissance>git commit -m "some message here"
[WARNING] Unstaged files detected.
[INFO] Stashing unstaged files to C:\Users\cool dude\.cache\pre-commit\patch1602049156.
[INFO] Installing environment for https://github.com/timothycrosley/isort.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Restored changes from C:\Users\cool dude\.cache\pre-commit\patch1602049156.
An unexpected error has occurred: CalledProcessError: command: ('d:\\mac\\sites\\project-reconnaissance\\env\\scripts\\python.exe', '-mvirtualenv', 'C:\\Users\\cool dude\\.cache\\pre-commit\\repowq_8m7xu\\py_env-python3.8', '-p', 'd:\\mac\\sites\\project-reconnaissance\\env\\scripts\\python.exe')
return code: 1
expected return code: 0
stdout:
RuntimeError: failed to build image pip because:
Traceback (most recent call last):
File "d:\mac\sites\project-reconnaissance\env\lib\site-packages\virtualenv\seed\embed\via_app_data\via_app_data.py", line 58, in
_install
installer.install(creator.interpreter.version_info)
File "d:\mac\sites\project-reconnaissance\env\lib\site-packages\virtualenv\seed\embed\via_app_data\pip_install\base.py", line 46, in install
for name, module in self._console_scripts.items():
File "d:\mac\sites\project-reconnaissance\env\lib\site-packages\virtualenv\seed\embed\via_app_data\pip_install\base.py", line 116, in _console_scripts
entry_points = self._dist_info / "entry_points.txt"
File "d:\mac\sites\project-reconnaissance\env\lib\site-packages\virtualenv\seed\embed\via_app_data\pip_install\base.py", line 103, in _dist_info
raise RuntimeError(msg) # pragma: no cover
RuntimeError: no .dist-info at C:\Users\cool dude\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\Local\pypa\virtualenv\wheel\3.8\image\1\CopyPipInstall\pip-20.2.3-py2.py3-none-any, has pip
Activity
gaborbernat commentedon Oct 7, 2020
Can you try removing folder
C:\Users\cool dude\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\Local\pypa\virtualenvand try again? You can achieve this by calling virtualenv with the--reset-app-dataflag.nautatva commentedon Oct 8, 2020
C:\Users\cool dude\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\Local\pypa\virtualenv--reset-app-dataflagBoth of these gave this error:
Here is

C:\\Users\\cool dude\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\\LocalCache\\Local\\pypa\\virtualenv\\wheel\\3.8\\image\\1\\CopyPipInstall\\pip-20.2.3-py2.py3-none-any\\pip\\_vendor\\urllib3\\packages\\ssl_match_hostname\\foldergaborbernat commentedon Oct 8, 2020
Can you post the verbose output when you pass in the
--reset-app-data?nautatva commentedon Oct 9, 2020
Here:
gaborbernat commentedon Oct 9, 2020
Did you enable long paths for your windows? https://superuser.com/questions/1119883/windows-10-enable-ntfs-long-paths-policy-option-missing
That error sounds like you've just reached Windows long path limit.... Would you have Python installed under a shorter path you'd not have this issue but:
leaves not much space for depth within your Python.