Questions tagged [egg]

A python egg is a file used for distributing python projects as bundles; it is usually compressed with the zip algorithm. Egg files normally include some metadata; the file extension is ".egg". The concept is very similar to a Java .jar file.

An egg is a bundle that contains all the package data. In the ideal case, an egg is a zip-compressed file with all the necessary package files. But in some cases, Python's setuptools decides (or is told via CLI switches) that a package should not be zip-compressed. In those cases, an egg is simply an uncompressed subdirectory, but with the same contents. The single file version is useful for transporting, and saves a little bit of disk space, but an egg directory is functionally and organizationally identical. The concept is very similar to a Java .jar file.

You may use an egg simply by pointing your shell environment's PYTHONPATH or Python's sys.path at it and importing as you normally would, for Python versions >= 2.5. If you wish to take this approach, you do not need to bother with setuptools or ez_setup.py at all.

338 questions
596
votes
3 answers

What is a Python egg?

I'm new to Python and I'm just trying to understand how its packages work. Presumably eggs are some sort of packaging mechanism, but what would be a quick overview of what role they play and may be some information on why they're useful and how to…
Bialecki
  • 26,315
  • 33
  • 78
  • 103
146
votes
6 answers

Is there a python equivalent of Ruby's 'rvm'?

Q: Do we have anything functionally equivalent in Python to the Ruby version manager 'rvm'? (RVM lets you easily switch completely between different versions of the ruby interpreter and different sets of gems (modules). Everything concerning…
conny
  • 9,012
  • 6
  • 35
  • 43
112
votes
8 answers

Most Pythonic way to provide global configuration variables in config.py?

In my endless quest in over-complicating simple stuff, I am researching the most 'Pythonic' way to provide global configuration variables inside the typical 'config.py' found in Python egg packages. The traditional way (aah, good ol' #define!) is…
Rigel Di Scala
  • 2,728
  • 2
  • 15
  • 23
93
votes
3 answers

How to create Python egg file

I have questions about egg files in Python. I have much Python code organized by package and I'm trying to create egg files. I'm following instructions, but they are very common. According to that, it seems I need to have a setup.py file. Would you…
yart
  • 6,695
  • 10
  • 33
  • 36
82
votes
1 answer

Python packages and egg-info directories

Can someone explain how egg-info directories are tied to their respective modules? For example, I have the following: /usr/local/lib/python2.5/site-packages/quodlibet/ /usr/local/lib/python2.5/site-packages/quodlibet-2.0.egg-info/ I'm assuming the…
Jeremy Cantrell
  • 23,209
  • 13
  • 51
  • 78
69
votes
3 answers

Build a wheel/egg and all dependencies for a python project

In order to stage python project within our corporation I need to make an installable distribution. This should include: An egg or whl for my project An egg or whl for every dependency of the project (optionally) produce a requirements.txt file…
Salim Fadhley
  • 4,511
  • 7
  • 33
  • 59
63
votes
6 answers

How do I manage third-party Python libraries with Google App Engine? (virtualenv? pip?)

What's the best strategy for managing third-party Python libraries with Google App Engine? Say I want to use Flask, a webapp framework. A blog entry says to do this, which doesn't seem right: $ cd /tmp/ $ wget…
a paid nerd
  • 28,574
  • 30
  • 121
  • 167
46
votes
8 answers

How to get setuptools and easy_install?

I downloaded the ez_setup code from here: http://peak.telecommunity.com/dist/ez_setup.py and ran it, but i don't think setuptools was properly installed. When i try to open an egg using easy_install i am getting a NameError. Any thoughts? Here is…
dopatraman
  • 11,801
  • 22
  • 74
  • 138
46
votes
2 answers

What is the difference between an 'sdist' .tar.gz distribution and an python egg?

I am a bit confused. There seem to be two different kind of Python packages, source distributions (setup.py sdist) and egg distributions (setup.py bdist_egg). Both seem to be just archives with the same data, the python source files. One difference…
Peter Smit
  • 24,538
  • 27
  • 105
  • 165
35
votes
4 answers

How to run Python egg files directly without installing them?

Is it possible to run Python egg files directly as you can run jar files with Java? For example, with Java you might dos something like: $ java -jar jar-file
Marko Kukovec
  • 631
  • 1
  • 6
  • 8
28
votes
2 answers

How do I uninstall a Python module (“egg”) that I installed with easy_install?

I’ve installed a couple of Python modules using easy_install. How do I uninstall them? I couldn’t see an uninstall option listed in easy_install --help.
Paul D. Waite
  • 89,393
  • 53
  • 186
  • 261
28
votes
2 answers

Python: Why do some packages get installed as eggs and some as "egg folders"?

I maintain a few Python packages. I have a very similar setup.py file for each of them. However, when doing setup.py install, one of my packages gets installed as an egg, while the others get installed as "egg folders", i.e. folders with an…
Ram Rachum
  • 71,442
  • 73
  • 210
  • 338
27
votes
6 answers

What are the advantages of packaging your python library/application as an .egg file?

I've read some about .egg files and I've noticed them in my lib directory but what are the advantages/disadvantages of using then as a developer?
minty
  • 21,168
  • 38
  • 87
  • 105
26
votes
5 answers

AssertionError: Egg-link .. does not match installed location of ReviewBoard (at /...)

AssertionError: Egg-link /home/daniel/other-rb/reviewboard does not match installed location of ReviewBoard (at /home/daniel/reviewboard) I believe this was caused by me installing a package at an additional location using the same virtualenv. How…
Daniel Paczuski Bak
  • 2,834
  • 5
  • 23
  • 51
23
votes
1 answer

How to determine the name of an egg for a Python package on Github?

I know I can install with $ pip install -e git+https://git.repo/some_pkg#egg=SomePackage but -- when I'm trying to use somebody else's package -- how do I determine what the name of the egg is?
Brian Dant
  • 3,579
  • 5
  • 26
  • 43
1
2 3
22 23