【问题标题】:I can't distribute own package我不能分发自己的包裹
【发布时间】:2013-07-04 15:48:48
【问题描述】:

一个月前,我为表单字段创建了自己的django widget。今天它被我注册了into PyPI

python setup.py register

我使用pip 并立即检查:

$ pip search django-split-json-widget
django-split-json-widget  - Provides a widget that renders JSON data as separate, editable inputs.

但我无法安装我的小部件:

$ pip install django-split-json-widget
Downloading/unpacking django-split-json-widget
  Could not find any downloads that satisfy the requirement django-split-json-widget
No distributions at all found for django-split-json-widget
Storing complete log in /Users/apple/.pip/pip.log

$ pip freeze
Django==1.5.1
Pygments==1.6
chromelogger==0.3.0
distribute==0.6.40
ipython==0.13.2
jsonpickle==0.4.0
psycopg2==2.5
pudb==2013.1
requests==1.2.0
urwid==1.1.1
wsgiref==0.1.2

谁能帮我理解并解决这些原因?

【问题讨论】:

    标签: python django pypi


    【解决方案1】:

    你只注册了你的包,但没有上传任何东西。

    运行python setup.py sdist upload 这样做;对于一个纯 python 包,你只需要一个源代码分发。

    您可能需要阅读PyPI howto 了解更多详情。

    【讨论】:

    • 你能回答吗,sdist 是 setup.py 的名称包或命令?
    • 问题被取消,我看到docs.python.org/2/distutils/sourcedist.html但是远程服务器回复我回复Upload failed (401): You must be identified to edit package information
    • 这意味着您没有将用户名和密码添加到您的 .pypirc 文件中。请参阅我链接到的 Howto。 上传命令使用 $HOME/.pypirc 文件中的用户名、密码和存储库 URL(有关此文件的更多信息,请参阅 .pypirc 文件部分)。
    • 程序好像变了
    • 现在我使用pypi.python.org/pypi/twine 比如python setup.py sdist 然后twine upload dist/*
    猜你喜欢
    • 2018-07-21
    • 2016-03-29
    • 2013-07-11
    • 2022-12-19
    • 2015-08-23
    • 2021-02-28
    • 1970-01-01
    • 2014-02-12
    • 2021-10-29
    相关资源
    最近更新 更多