我正在构建一个Python软件包,我的软件包有一些安装要求。这是我 setup.py 文件代码:
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="simpleEDA",
version="0.0.1",
author="Muhammad Shahid Sharif",
author_email="chshahidhamdam@gmail.com",
description="A wrapper around Pandas to perform Simple EDA with less code.",
long_description=long_description,
long_description_content_type="text/markdown",
url="github link here",
packages=['simple_eda'],
install_requires = ['matplotlib',
'numpy',
'numpydoc',
'pandas',
'scikit-image',
'scikit-learn',
'scipy',
'seaborn'],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independen.t",
],
python_requires='>=3.5',
)
我已经创建了 whl 文件并将其上传到测试 PyPI 上。 这是链接
pip install -i https://test.pypi.org/simple/ simpleEDA==0.0.1
如果我尝试安装它,它会给我这个错误。
Could not find a version that satisfies the requirement numpydoc (from simpleEDA==0.0.1) (from versions: )
No matching distribution found for numpydoc (from simpleEDA==0.0.1)
为什么我的install_requires不起作用?为什么不安装库?
您正在尝试使用 TestPyPI 作为索引进行安装:
pip install -i https://test.pypi.org/simple/ simpleEDA==0.0.1
但是,大多数子依赖项在TestPyPI上不存在,例如 https://test.pypi.org/project/numpydoc/是404。
根据您使用TestPyPI的目的,您最好在PyPI上进行预发布。