在自定义程序包中进行pip安装时,如何解决install_requires列表的“找不到满足要求的版本”?

问题描述

我正在尝试使用twine软件包构建自己的Python软件包(可通过pip安装)。一切顺利,直到我尝试通过pip安装我的实际软件包为止(因此,在上传到PyPi之后)。

所以我首先运行:

python3 setup.py sdist bdist_wheel

其中的setup.py install_requires列表如下:

install_requires=[
'jupyter_kernel_gateway==2.4.0','pandas==1.0.2','numpy==1.18.1','azure-storage-blob==2.0.1','azure-datalake-store==0.0.48','psycopg2-binary==2.8.4','xlsxwriter==1.2.6','SQLAlchemy==1.3.12','geoalchemy2==0.6.3','tabulate==0.8.2','pyproj==1.9.6','geopandas==0.4.0','contextily==0.99.0','matplotlib==3.0.2','humanize==0.5.1','ujson==1.35','singleton-decorator==1.0.0','dataclasses==0.6','xlrd==1.2.0'],

据我了解,这些install_requires将在安装我自己的软件包时由pip安装。

此后我运行

python3 -m twine upload --repository testpypi dist/*

实际将我的包上传到PyPi。但是,在pip安装我的软件包时,出现错误,提示没有满足许多所列要求的版本。例如:ERROR: Could not find a version that satisfies the requirement psycopg2-binary==2.8.4

当我手动安装这些软件包(例如pip install psycopg2-binary==2.8.4)时,它们确实已安装。

有什么方法可以使我的软件包的pip安装成功地成功安装install_requires需求列表吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)