Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 345
Peter Smit Avatar asked Jun 09 '11 11:06

Peter Smit


3 Answers

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.

like image 124
neurino Avatar answered Nov 17 '22 11:11

neurino


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.

like image 25
Noufal Ibrahim Avatar answered Nov 17 '22 10:11

Noufal Ibrahim


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

like image 2
rubik Avatar answered Nov 17 '22 09:11

rubik