我使用以下setup.py分发了我的python包
#!/usr/bin/env python
from setuptools import setup
setup(name='mypackagename',
version='0.1',
description='Tool ....',
author='Peter Smit',
author_email='lala@lala.com',
packages=['mypackagename'],
package_dir={'': 'src'},
install_requires=['boto'],
entry_points = dict(console_scripts=[
'mypackagenamescript = mypackagename.launcher:run',
])
)
我用python setup.py bdist_egg创建了一个鸡蛋.
现在尝试使用pip安装它会产生以下错误:
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
存储完整的日志/home/peter/.pip/pip.log
提到的日志文件显示它试图从pypi下载包,它显然不存在.
我做错了什么?我怎样才能安装我的这个鸡蛋加上它的依赖?
解决方法:
为什么不使用setuptools easy_install?
easy_install mypackagename-0.1-py2.6.egg
如果你想与鸡蛋一起工作.