Why does my python egg not work? - No distributions at all found for

Peter Smit picture Peter Smit · Jun 9, 2011 · Viewed 7.1k times · Source

I have made a distribution of my python package with the following setup.py

#!/usr/bin/env python

from setuptools import setup

setup(name='mypackagename',
      version='0.1',
      description='Tool ....',
      author='Peter Smit',
      author_email='[email protected]',
      packages=['mypackagename'],
      package_dir={'': 'src'},
      install_requires=['boto'],
      entry_points = dict(console_scripts=[
        'mypackagenamescript = mypackagename.launcher:run',
        ])
      )

I created an egg of this with python setup.py bdist_egg.

Trying to install it now with pip gives the following error:

bin/pip install mypackagename-0.1-py2.6.egg 
Downloading/unpacking mypackagename-0.1-py2.6.egg
  Could not find any downloads that satisfy the requirement mypackagename-0.1-    py2.6.egg
No distributions at all found for mypackagename-0.1-py2.6.egg

Storing complete log in /home/peter/.pip/pip.log

The mentioned log files showed that it tries to download the package from pypi, where it obviously does not exist.

What did I do wrong? How can I install this egg of mine plus it's dependencies?

Answer

Noufal Ibrahim picture Noufal Ibrahim · Jun 9, 2011

pip cannot install from eggs.

If you want your package to be available on PyPI, you need to register and account there and upload it. You can then simply say pip install myproject. It will search PyPI, find it, download and install it.

If you have your setup.py ready and want to install your application locally, all you need to do is to say python setup.py install. You don't need to use pip or easy_install.

The hitchhikers guide to packaging contains details on all these things. It should make things clear.