Skip to content
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

pip install won't install a package if you are in a directory with an egg-info of that package and version. #2927

Closed
tomprince opened this issue Jun 24, 2015 · 4 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@tomprince
Copy link

So, if I do python setup.py sdist && pip install dist/<package>, it won't actually install the package, because that creates an egg-info in the current directory.

This appears to have been introduced between 7.0.2 and 7.0.3.

The underlying issue here is perhaps the same as #2926

@dstufft
Copy link
Member

dstufft commented Jun 24, 2015

Hrm, I don't think this could have been introduced in 7.0.3 since there was only a minor unrelated fix between 7.0.2 and 7.0.3.

Did you actually use pip install or did you use python -m pip?

@tomprince
Copy link
Author

I was actually seeing it in tox.

@dstufft
Copy link
Member

dstufft commented Jun 24, 2015

I think tox actually calls python -m pip, and if I recall when you execute python -m pip instead of pip Python itself adds . to sys.path. When pip (via pkg_resources) inspects the sys.path it would then see the installed distribution.

If that's right, I'm not sure what we should do, we could modify sys.path to remove .... but is that the right thing to do?

@dstufft
Copy link
Member

dstufft commented Mar 22, 2017

Closing this, the fundamental issue is that the egg-info is on the sys.path and we don't have a way to determine that it isn't supposed to be.

@dstufft dstufft closed this as completed Mar 22, 2017
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 3, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

No branches or pull requests

2 participants