为什么我不能使用pypi安装我的软件包,并且我有错误?

2024-09-30 02:22:37 发布

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

这是可以创建简单图像验证码的icaptcha软件包的my setup.py

import pathlib
from setuptools import setup

# The directory containing this file
HERE = pathlib.Path(__file__).parent

# The text of the README file
README = (HERE / "README.md").read_text()

# This call to setup() does all the work
setup(
    name="ICaptcha",
    version="2.0.0",
    description="Create Simple Image Captcha For Normal Use",
    long_description=README,
    long_description_content_type="text/markdown",
    url="https://github.com/imanhpr/ICaptcha",
    author="Iman Hosseini Pour",
    author_email="imanhpr1999@gmail.com",
    license="MIT",
    classifiers=[
        "License :: OSI Approved :: MIT License",
        "Programming Language :: Python :: 3",
        "Programming Language :: Python :: 3.8",
    ],
    packages=['icaptcha'],
    include_package_data=True,
    install_requires=["pillow"],

)

我在pypi中上传了它,当我尝试安装我的包时,我看到了这个错误

pip install icaptcha
ERROR: Could not find a version that satisfies the requirement string (from ICaptcha) (from versions: none) 
ERROR: No matching distribution found for string (from ICaptcha)

此错误是什么?我如何修复此错误


Tags: thetextfromimporthereversion错误setup
1条回答
网友
1楼 · 发布于 2024-09-30 02:22:37

您已将包上载到测试PyPI:https://test.pypi.org/project/ICaptcha/

但不是PyPI:https://pypi.org/project/ICaptcha/返回错误404

要使用PyPI的依赖项从测试PyPI安装,请执行以下操作:

pip install -i https://test.pypi.org/simple/  extra-index-url https://pypi.org/simple/ ICaptcha

或者上传到PyPI并重复

pip install ICaptcha

相关问题 更多 >

    热门问题