Peter Smit
Peter Smit

Reputation: 28716

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

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?

Upvotes: 5

Views: 8930

Answers (3)

rubik
rubik

Reputation: 9104

Pip cannot install eggs. IMHO that is a serious lack. I would suggest you to try out Pyg. Just download the get-pyg.py script and execute it:

$ curl -O https://raw.github.com/rubik/pyg/master/get-pyg.py
$ python get-pyg.py
Retrieving archive from ... etc.

Note: As an alternative, you can install it via easy_install or pip.

Then you can use it:

$ pyg install mypackagename-0.1-py2.6.egg

Pyg supports virtualenv too.

rubik

Upvotes: 2

neurino
neurino

Reputation: 12405

why not using setuptools easy_install?

easy_install mypackagename-0.1-py2.6.egg 

If you want to work with eggs that's the way.

Upvotes: 2

Noufal Ibrahim
Noufal Ibrahim

Reputation: 72755

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.

Upvotes: 2

Related Questions