How to determine the name of an egg for a Python p

2020-06-07 05:59发布

问题:

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?

回答1:

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