为什么我的蟒蛇蛋不起作用? - 根本没有找到发行版
我已经使用以下 setup.py 分发了我的 python 包,
#!/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',
])
)
我使用 python setup.py bdist_egg 创建了一个 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 下载包,而该包显然不存在。
我做错了什么?我如何安装我的这个egg及其依赖项?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
为什么不使用 setuptools
easy_install
?如果你想使用鸡蛋,那就是这样。
why not using setuptools
easy_install
?If you want to work with eggs that's the way.
pip 无法从 Egg 安装。
如果您希望您的软件包在 PyPI 上可用,您需要在那里注册并创建帐户并上传。然后您可以简单地说
pip install myproject
。它将搜索 PyPI,找到它,下载并安装它。如果您已准备好
setup.py
并希望在本地安装应用程序,则只需输入python setup.py install
即可。您不需要使用 pip 或 easy_install。打包搭便车指南包含所有这些内容的详细信息。它应该让事情变得清楚。
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 saypython 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.
Pip 无法安装 Egg。恕我直言,这是一个严重的缺乏。我建议你尝试 Pyg。只需下载
get-pyg.py
脚本并执行它:注意:作为替代方案,您可以通过 easy_install 或 pip 安装它。
然后你就可以使用它了:
Pyg也支持virtualenv。
鲁比克
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:Note: As an alternative, you can install it via easy_install or pip.
Then you can use it:
Pyg supports virtualenv too.
rubik