egg

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

喜欢而已 提交于 2019-12-03 10:52:02
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? Look at the git repo, find the setup.py file in the root and find what is passed to the name keyword in the setup() function call. For example, the Pyramid setup.py has: setup(name='pyramid', so you'd use: $ pip install -e git+https://github.com/Pylons/pyramid.git#egg=pyramid 来源: https://stackoverflow.com/questions/21638929/how-to-determine-the-name-of-an-egg-for-a-python-package-on-github

Why does pip fail when installing local egg repository?

被刻印的时光 ゝ 提交于 2019-12-03 10:24:00
I am working on Windows 7.I have created a python egg using distutils. Now I try to install this egg in a virtual environment using pip 1.0.2 using the following command: Then I create a virtual environment myVirtualEnv I activate it using activate.bat then execute the following command: pip install path_to_my_local_folder#eggName This creates a copy of my egg in my myVirtualEnv\build directory but I have the following error: IOError: [Errno 2] No such file or directory: path_of_my_virtualEnv\build\PyEqdR\setup.py Do you know why pip is looking for the setup.py file. Should I include it in the

How to include a python .egg library that is in a subdirectory (relative location)?

回眸只為那壹抹淺笑 提交于 2019-12-03 10:18:52
How do you import python .egg files that are stored in a relative location to the .py code? For example, My Application/ My Application/library1.egg My Application/libs/library2.egg My Application/test.py How do you import and use library1 and library2 from within test.py, while leaving the .egg libraries in-place? Eli Bendersky An .egg is just a .zip file that acts like a directory from which you can import stuff. You can use the PYTHONPATH variable to add the .egg to your path, or append a directory to sys.path . Another option is to use a .pth file pointing to the eggs. For more info see A

Why does easy_install extract some python eggs and not others?

蹲街弑〆低调 提交于 2019-12-03 05:54:02
Looking in my /usr/local/lib/python.../dist-package directory, I have .egg directories and .egg files. Why does the installer choose to extra packages to the .egg directory, yet leave other files with .egg extensions? If the package contains only pure-Python code, it can stay as just an egg file. The Python interpreter can load the Python modules directly from the egg. If the package contains modules written in C or other data, then egg needs to be extracted so the C modules and/or data can be accessed. That's the default behavior of packages, I believe. Newer versions of Python might be able

python: simple example for a python egg with a one-file source file?

五迷三道 提交于 2019-12-03 05:12:06
问题 I'm not quite sure how to build a really simple one-file source module. Is there a sample module out there one the web somewhere which can be built as a python .egg? From the setuptools page it looks pretty simple, you just have your setup.py file and then at least one other .py file somewhere, and I can build an .egg file OK, and even install it using easy_install , but I can't seem to import the file from within python. (note: using 2.6.4) here's my sample dir: sconsconfig setup.py

How to run Python egg files directly without installing them?

蓝咒 提交于 2019-12-03 03:05:02
问题 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 回答1: A python egg is a "a single-file importable distribution format". Which is typically a python package. You can import the package in the egg as long as you know it's name and it's in your path. You can execute a package using the "-m" option and the package name. However, python packages generally do not do anything when executed,

Namespace package with both tarball and egg in Python

爷,独闯天下 提交于 2019-12-02 20:17:27
问题 I've followed this tutorial to make a package with namespace. Then I use pip install xxx.tar.gz to install and everything works like expect. The problem is that my environment has already a lots of packages with the same namespace and installed with easy_install and eggs , and python can not find the old packages anymore. I understand that if I create tar.gz instead of eggs for all the olds pacakges, it would work fine but this is a lots of time to spend. How can I make the new and old

python: simple example for a python egg with a one-file source file?

本秂侑毒 提交于 2019-12-02 19:38:31
I'm not quite sure how to build a really simple one-file source module. Is there a sample module out there one the web somewhere which can be built as a python .egg? From the setuptools page it looks pretty simple, you just have your setup.py file and then at least one other .py file somewhere, and I can build an .egg file OK, and even install it using easy_install , but I can't seem to import the file from within python. (note: using 2.6.4) here's my sample dir: sconsconfig setup.py sconsconfig.py setup.py: from setuptools import setup, find_packages setup(name='sconsconfig', version='0.1',

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

为君一笑 提交于 2019-12-02 17:06:16
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 is that pip , the most recommended package manager, is not able to install eggs. What is the difference between the two and what is 'the' way to do distribute my packages? (Note, I am not wanting to distribute my packages through PyPI, but I want to use a package manager that fetches my dependencies from PyPI) setup.py sdist creates a source