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 ./path/to/some.egg doesn't work #492

Closed
glyph opened this issue Mar 25, 2012 · 17 comments
Closed

pip install ./path/to/some.egg doesn't work #492

glyph opened this issue Mar 25, 2012 · 17 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@glyph
Copy link

glyph commented Mar 25, 2012

Partially I'm just curious, but I also think this should probably work: why does 'pip install [sdist]' work but not 'pip install [egg]'?

The ability to locally install binary eggs would be helpful when distributing software to end users for testing, before sticking it on PyPI.

(Sorry if this is a duplicate, none of the tickets I could find involving eggs seemed to cover this exactly.)

@kennethreitz
Copy link
Contributor

Aren't eggs explicitly unsupported?

@glyph
Copy link
Author

glyph commented Mar 25, 2012

If that's true, then a useful error message would be nice.

@carljm
Copy link
Contributor

carljm commented Mar 26, 2012

Yes, pip explicitly does not support any type of binary distribution, whether installed locally or from PyPI. The reason is that support for installing them from PyPI is broken as designed, since there is no way to determine from the metadata available at PyPI whether a given binary distribution will actually work on your installation of Python. And if we supported installing them locally, it would just shift the obvious question to "why can I install this egg if I reference it locally, but not from PyPI".

I'd certainly accept a pull request for a better error message when this is attempted.

@glyph
Copy link
Author

glyph commented Mar 26, 2012

Thanks for the explanation. I am pretty sure I sort of knew that, in the back of my mind, but I was looking at the filename of the egg and it seemed to contain enough information; but I realize that's just an heuristic.

@technomalogical
Copy link

Is there a separate issue tracking binary .exe installation on Windows platforms? Ian has mentioned in the past that this is something pip would like to support. I'd be interested in hacking on a solution to the problem.

@carljm
Copy link
Contributor

carljm commented May 1, 2012

@technomalogical I don't believe there is an issue tracking that; feel free to file one and work on it!

@technomalogical
Copy link

Created #520

@stchris
Copy link

stchris commented May 10, 2012

@carljm Which metadata is missing exactly? There has to be a way to fix this somehow, otherwise I guess easy_install couldn't do it either.

@carljm
Copy link
Contributor

carljm commented May 10, 2012

@stchris UCS2 vs UCS4 builds is one issue (though that will no longer apply on Python 3.3+ with PEP 393). There can also be issues with gcc/libc versions, versions of other compilers used to compile e.g. fortran extensions, etc. easy_install doesn't solve these issues, it just punts on them - easy_install can and will download and install a binary egg that doesn't actually work with your Python in some cases. (This is mostly an issue on Linux.)

If energy is to be put into this area, it would be more productive to put it into helping design a binary distribution format to be supported by distutils2/packaging. There is openness to this and some interested people, but nobody has taken the lead on pushing something through. Pip plans to eventually become a much thinner wrapper around d2/p, so it's unlikely that we'll decide to now suddenly start supporting a binary distribution format (eggs) that d2/p itself does not support.

@dstufft
Copy link
Member

dstufft commented Jan 30, 2014

Closing this as Eggs are deprecated and pip supports Wheel now.

@dstufft dstufft closed this as completed Jan 30, 2014
@dwt
Copy link
Contributor

dwt commented Sep 10, 2014

Out of interest, it seems to me that it would be really useful if I am still able to install legacy egg files for which I know that they already did work in the past on this machine.

To be fair, I'd really apreciate a default fail with an explanation telling me that this is unsafe and why. But I'd also really like a --force option to override this for cases where I know it's safe.

I appreciate that pip is helpfull (though the current error message really sucks), but it should not force me to not shoot myself in the foot if I want to. Because I really might know better.

Here's my argument: Why do you force me to switch all my infrastructure at once, instead of allowing to migrate to pip gradually? I would really like to use it (more) but am constantly held back in a lot of places because there are still eggs that I really want to install and can't.

My proposal: add a --i-know-what-i-m-doing-really-install-eggs option and make it really easy for people to migrate from easy_install (old and busted) to pip (new hotness).

@dwt
Copy link
Contributor

dwt commented Sep 10, 2014

@dstufft on your blog you asked people to talk to you about cases where python packaging failed you - so here I go.

@dstufft
Copy link
Member

dstufft commented Sep 10, 2014

Quick question, are the eggs in question on PyPI or are they on your own machine?

@dwt
Copy link
Contributor

dwt commented Sep 11, 2014

My machine, and they where installed earlier on that machine, so I am fairly sure they will work again.

@dstufft
Copy link
Member

dstufft commented Sep 11, 2014

Ok, so primary reason pip doesn't support Eggs is it has historically not supported eggs and we decided not to add code to pip that we would immediately deprecate in favor of Wheels. Can you just convert them to Wheels? The wheel library has a command that will convert an egg to a wheel if I recall.

@pfmoore
Copy link
Member

pfmoore commented Sep 11, 2014

The command is wheel convert <eggname>

@dwt
Copy link
Contributor

dwt commented Sep 11, 2014

That's great to know, I'll try that.

Could you guys pease put this in the error message that is shown when you try to install an egg with pip?

Would it be even possible to have a flag to pip that would make it auto convert egg files and then install the resulting wheel file?

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 5, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 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

8 participants