【问题标题】:No distributions at all found, even though I recently published the package即使我最近发布了包,也没有找到任何发行版
【发布时间】:2015-07-09 04:19:34
【问题描述】:

各位程序员们好,

所以最近我一直在从事一个我们想要开源的项目。这是一个名为django-push-notifications-manager 的包(是的,我知道这个名字很不寻常)。

所以我已经注册并上传了包,但是由于某种原因pip install django-push-notifications-manager 不起作用并会报错:

Downloading/unpacking django-push-notifications-manager
  Could not find any downloads that satisfy the requirement django-push-notifications-manager
Cleaning up...
No distributions at all found for django-push-notifications-manager
Storing debug log for failure in /Users/pauloostenrijk/.pip/pip.log

所以我无法通过删除和替换包、删除它、制作新版本来修复它。他们都没有工作。

我想你们想知道我的setup.py是什么,所以特此:

#!/usr/bin/env python
# -*- coding: utf-8 -*-

import os
import sys

import push_notifications


def get_packages(package):
    """
    Return root package and all sub-packages.
    """
    return [dirpath
            for dirpath, dirnames, filenames in os.walk(package)
            if os.path.exists(os.path.join(dirpath, '__init__.py'))]

try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

version = push_notifications.__version__

if sys.argv[-1] == 'publish':
    os.system('python setup.py sdist upload')
    print("You probably want to also tag the version now:")
    print("  git tag -a %s -m 'version %s'" % (version, version))
    print("  git push --tags")
    sys.exit()

readme = open('README.rst').read()

setup(
    name='django-push-notifications-manager',
    version=version,
    description="""A plug and play package to handle push devices and push notifications for services such as ZeroPush and Urban Airship""",
    long_description=readme,
    author='Paul Oostenrijk',
    author_email='paul@glemma.nl',
    url='https://github.com/glemmaPaul/django-push-notifications-manager',
    packages=get_packages('push_notifications'),
    include_package_data=True,
    install_requires=[
        'django>=1.5.1',
        'requests>=2.5.1'
    ],
    license="BSD",
    zip_safe=False,
    keywords='django-push-notifications-manager',
    classifiers=[
        'Development Status :: 2 - Pre-Alpha',
        'Framework :: Django',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: BSD License',
        'Natural Language :: English',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
    ],
)

希望你们中的任何人都可以帮助我!在此先感谢:)

【问题讨论】:

  • 如果我用pip search django-push-notifications-manager 搜索你的包,pip 会正确找到它。但是,如果我尝试使用pip install django-push-notifications-manager 安装它,我会遇到与您相同的错误。可能是sdist upload 的问题?

标签: python pip pypi


【解决方案1】:

所以在花了很长时间尝试和弄清楚之后,我终于找到了问题所在。

我不觉得奇怪,但显然 PyPi 的名称 django-push-notifications-manager 有问题,我认为可能有两个原因:

  • 名字的长度
  • 名称中最多包含 2 个破折号

我希望没有人会遇到这个问题,真是头疼!

感谢您的宝贵时间!

【讨论】:

    猜你喜欢
    • 2015-09-03
    • 2019-10-10
    • 2018-04-02
    • 1970-01-01
    • 2016-12-09
    • 2014-03-26
    • 1970-01-01
    • 1970-01-01
    • 2018-11-20
    相关资源
    最近更新 更多