从testpypi安装我的项目给我一个错误



我正在学习如何打包python项目并发布它们,我遇到了一个问题,我一直试图解决,但失败了。

我有这个小项目,我想把它上传到Testpypi

我设法把它上传到那里,我甚至可以在(https://test.pypi.org/project/cli-assistant/)找到它

问题:当我尝试使用

安装它时
pip install -i https://test.pypi.org/simple/ cli-assistant

我得到这个错误:

Looking in indexes: https://test.pypi.org/simple/
ERROR: Could not find a version that satisfies the requirement cli-assistant (from versions: none)
ERROR: No matching distribution found for cli-assistant

下面是完整的setup.py文件

from setuptools import setup, find_packages
with open("Description.rst", "r", encoding="utf-8") as fh:
long_description = fh.read()
with open("requirements.txt", "r", encoding="utf-8") as fh:
requirements = fh.read()
setup(
name= 'cli-assistant',
version= '0.0.5',
author= 'my name',
author_email= 'my email',
license= 'MIT License',
description='guide you with terminal and git commands',
long_description=long_description,
url='https://github.com/willsketch/Helper',
py_modules=[ 'my_helper'],
packages= find_packages(),
install_requires = [requirements],
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
],
include_package_data=True,
package_data={'helper':['examples.txt']},
entry_points= {
'console_scripts':[
'helper = my_helper:cli',
]
}
)

只上传了一个.egg文件。Pip不能安装鸡蛋。您应该上传一个源发行版(.tar.gz.zip)和/或轮子(.whl)。

相关内容

  • 没有找到相关文章

最新更新