-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"No such file or directory" install error when egg fragment / project name differs from package name #5271
Comments
I'm having the same issue as @xlqian when using egg fragments in install URLs using |
I think I am experiencing a similar/same problem, however with an Trying to install version of IfcOpenShell.
Returns the following error:
|
Edit: Not the same problem |
@themmes I try to install pyqt4 with pip but I get: |
I just tested this, and the complete is actually much more confusing than provided in the top post (the same from 10.0 to master):
Some initial observations:
|
Also @francopythonss your error is caused by a different code path, and probably (I am not sure) should be reported as a separate issue. This issue is specific to installing from VCS with |
I did some debugging, here’s what I observed: The package in question ( The first installation correctly succeeds, but the second one generates the error because the source is deleted during the clean up phase of the first installation. The second installation entry is added by the resolver. pip/src/pip/_internal/resolve.py Lines 290 to 297 in 116c3b1
Unfortunately, after knowing this, the fix is still not straightforward. For a remote, non-dist requirement, pip cannot know the package name before it downloads and runs [*]: Theoretically I believe it can, but that would probably require a huge restructure to implement. |
I don't know if hard-erroring is permissible or not (e.g. for backwards compatibility). However, as long as pip isn't hard erroring, what about fixing the RequirementSet key once pip notices it is wrong? It seems that has the potential of letting pip continue without doing more harm. |
It is definitely possible. pip can already perform some name inference if you don’t provide the
But I don’t know exactly when this would work and when not. The mismatching name causes inconsistencies within the data structure, and while this particular RequirementSet problem is relatively easy to plug, I don’t know if there are more inconsistencies that can pop up in the future (do anyone?), and what consequences they would cause. Personally I think it would make pip harder to maintain in the future. Maybe a possible approach is to hard-error on mismatching egg name, and instruct the user to try removing it. This would mostly solve the problem if the egg name inference works most of the time (but again, I don’t know if it does). |
Yes, that is definitely possible. If a change to fix the key were done, one would definitely want to audit / review the code to make sure no code still has references to the old name (and possibly do some refactoring to make sure the name is always being accessed through a single code path). Issue #5051 will help with making the installation code simpler to reason about (perhaps more functional), but that is a longer term project. |
I was having this issue until I noticed I should have quoted the whole thing in command line e.g. |
From the report and discussion in pypa/packaging-problems#252, it looks like projects switching over to PEP 517 from |
This error drove me crazy since the name of the package was different in |
This error can also be caused by a dependency specified in setup.py install_requires like 'sk-video @ git+https://github.com/scikit-video/scikit-video.git@master', which appears to be equivalent to to how you'd specify egg=sk-video when pip-installing on the command line. With such a setup.py:
Fortunately, when installing directly from GitHub, you're not bound to use the same name that PyPI uses, so in this example you can just change it to 'scikit-video @ git+https://github.com/scikit-video/scikit-video.git@master'. |
We'd probably want to look into this as apart of #6607. |
Found similar issue when install retrying package via pip.
|
Description:
"No such file or directory" when pip-installing with #egg=~
What I've run:
pip install git+https://github.com/clarkduvall/serpy.git@master#egg=TOTO
Errors I've got:
My Guess
It seems that pip will git-clone the project into a tmp dir
/tmp/pip-install-lE7moQ/TOTO
, but when running the installation, it will look for thesetup.py
in/tmp/pip-install-lE7moQ/serpy/
, which was not produced in pip==9.0.1The text was updated successfully, but these errors were encountered: