在Python包错误的setup.py文件中安装\u requires

2024-07-01 08:24:10 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在构建一个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)

为什么我的安装不起作用?为什么不安装库


Tags: install文件fromversionwithsetupdescriptionsimple
1条回答
网友
1楼 · 发布于 2024-07-01 08:24:10

您正在尝试使用TestPyPI作为索引进行安装:

pip install -i https://test.pypi.org/simple/ simpleEDA==0.0.1

但是,TestPyPI上不存在大多数子依赖项,例如https://test.pypi.org/project/numpydoc/是404

根据您使用TestPyPI的目的,您最好在PyPI上创建一个pre-release

相关问题 更多 >

    热门问题