Почему я не могу установить пакет, используя pypi, и у меня ошибка? - PullRequest
0 голосов
/ 01 мая 2020

это мой setup.py для моего пакета icaptcha, который может создать простое изображение captcha

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)

что это за ошибка и как я могу это исправить?

1 Ответ

1 голос
/ 01 мая 2020

Вы загрузили пакет в Test PyPI: https://test.pypi.org/project/ICaptcha/

Но не в PyPI: https://pypi.org/project/ICaptcha/ возвращает ошибку 404.

Для установки из Test PyPI с зависимостями от PyPI:

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

Или загрузите в PyPI и повторите

pip install ICaptcha
...