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.

354 questions
688
votes
4 answers

What is a Python egg?

I'm trying to understand how Python 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 create them?
Bialecki
  • 30,061
  • 36
  • 87
  • 109
158
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
  • 3,150
  • 2
  • 17
  • 23
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,973
  • 6
  • 38
  • 47
98
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
  • 6,975
  • 14
  • 46
  • 83
98
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
  • 7,515
  • 12
  • 37
  • 37
86
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
  • 26,392
  • 13
  • 55
  • 78
64
votes
7 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
  • 30,702
  • 30
  • 134
  • 179
57
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
  • 27,696
  • 33
  • 111
  • 170
47
votes
9 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
  • 13,416
  • 29
  • 90
  • 154
35
votes
6 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
  • 3,720
  • 8
  • 32
  • 78
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
  • 691
  • 1
  • 6
  • 8
29
votes
1 answer

"pipenv requires an #egg fragment for version controlled dependencies" warning when installing the BlueJeans meeting API client

Adapting the instructions from https://github.com/bluejeans/api-rest-meetings/tree/master/libs/python#pip-install, in a pipenv shell I'm trying to run pipenv install git+https://github.com/bluejeans/api-rest-meetings.git@pip-repo However, I'm…
Kurt Peek
  • 52,165
  • 91
  • 301
  • 526
28
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
  • 22,235
  • 40
  • 89
  • 106
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
  • 96,640
  • 56
  • 199
  • 270
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
  • 84,019
  • 84
  • 236
  • 374
1
2 3
23 24