我正在尝试创建我的第一个python包.为了不搞砸整个交易,我一直在尝试将其上传到testpypi服务器.这似乎很好(sdist创建和上传不显示任何错误).但是,当我尝试从https://testpypi.python.org/pypi将其安装到新的virtualenv时,它会抱怨我的安装要求,例如:
pip install -i https://testpypi.python.org/pypi poirot Collecting poirot Downloading https://testpypi.python.org/packages/source/p/poirot/poirot-0.0.15.tar.gz Collecting tqdm==3.4.0 (from poirot) Could not find a version that satisfies the requirement tqdm==3.4.0 (from poirot) (from versions: ) No matching distribution found for tqdm==3.4.0 (from poirot)
tqdm和Jinja2是我唯一的要求.我尝试指定版本,而不是单向指定-Error.
它似乎试图在testpypi服务器上找到tqdm和Jinja2而没有找到它们(因为它们只能在普通的pypi上使用).将软件包上传到非测试服务器并运行pip install.
我需要添加到setup.py文件(如下所示),以便在上传到testpypi时找到它们的要求?
谢谢!
try: from setuptools import setup except ImportError: from distutils.core import setup setup(name='poirot', version='0.0.15', description="Search a git repository's revision history for text patterns.", url='https://github.com/dcgov/poirot', license='https://raw.githubusercontent.com/DCgov/poirot/master/LICENSE.md', packages=['poirot'], install_requires=['tqdm==3.4.0', 'Jinja2==2.8'], test_suite='nose.collector', tests_require=['nose-progressive'], classifiers=[ 'Environment :: Console', 'Intended Audience :: Developers', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5' ], include_package_data=True, scripts=['bin/big-grey-cells', 'bin/little-grey-cells'], zip_safe=False)
pylang.. 34
试试pip install --extra-index-url https://testpypi.python.org/pypi poirot
.
请参阅参考从一个或多个需求文件中的多个服务器安装包
试试pip install --extra-index-url https://testpypi.python.org/pypi poirot
.
请参阅参考从一个或多个需求文件中的多个服务器安装包