Path names not normalized properly with development install on Windows?
See original GitHub issueI’m trying to install a package with the -e .
option (via Pipenv) and am getting the following error:
Using c:\users\user\appdata\roaming\python\python37\site-packages
Finished processing dependencies for echovr-api==0.1.1
An error occurred while installing -e .! Will try again.
================================ 6/6 - 00:00:01
Installing initially failed dependencies…
Obtaining file:///E:/User/Programming/projects/echovr-api
Installing collected packages: echovr-api
Running setup.py develop for echovr-api
Complete output from command e:\user\programming\projects\echovr-api\.venv\scripts\python.exe -c "import setuptools, tokenize;__file__='E:\\User\\Programming\\projects\\echovr-api\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" develop --no-deps:
running develop
Checking .pth file support in e:\user\programming\projects\echovr-api\.venv\Lib\site-packages\
e:\user\programming\projects\echovr-api\.venv\scripts\pythonw.exe -E -c pass
TEST PASSED: e:\user\programming\projects\echovr-api\.venv\Lib\site-packages\ appears to support .pth files
error: ("Can't get a consistent path to setup script from installation directory", 'e:\\user\\programming\\projects\\echovr-api\\', 'e:\\user\\programming\\projects\\echovr-api')
This seems odd, because “e:\user\programming\projects\echovr-api\” and “e:\user\programming\projects\echovr-api” are consistent paths, setuptools just seems to be comparing them incorrectly.
I traced the error to this line:
Which, in turn, seems to rely on the normalize_path
function, which is defined here:
Given the docstring description of that function, I want to know if it would make sense to change it to strip trailing path separators. (I can send a PR if so.)
If possible, I’d also like to know if you have any suggestions for a work-around for this error, as I don’t really want to wait for setuptools to be patched before I can continue working on my project.
If necessary, you can reproduce the error by checking out the “wip-test-error” branch of my repository here: https://github.com/Ajedi32/echovr-api/tree/wip-test-error and running pip install --user pipenv && pipenv install
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
@hobson: the behavior was changed in setuptools 40.6.0, so you’ll need to upgrade setuptools also to get the improved behavior.
So
pip install --upgrade pip setuptools
because pip doesn’t include the latestsetuptools
as a dependency.