小编mad*_*ote的帖子

Python Setup.py - 依赖项作为 TAR 或 GIT 的 url

根据我的研究,以下应该有效:

from setuptools import setup
from setuptools import find_packages
...
REQUIRES_INSTALL = [
    'spacy==2.3.2',
    'tensorflow==1.14.0',
    'Keras==2.2.4',
    'keras-contrib@git+https://github.com/keras-team/keras-contrib.git#egg=keras-contrib',
    'en-core-web-sm@https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.3.0/en_core_web_sm-2.3.0.tar.gz#egg=en-core-web-sm'
]
...
setup(
    name=NAME,
    version=VERSION,
    description=DESCRIPTION,
    install_requires=REQUIRES_INSTALL,
    ...
)
Run Code Online (Sandbox Code Playgroud)

当建造轮子或鸡蛋时,一切都很好:python setup.py bdist_wheel

但是当尝试使用pip install -U dist/mypack-....whl.

我得到:

ERROR: Could not find a version that satisfies the requirement keras-contrib (from mypack==0.3.5) (from versions: none)
ERROR: No matching distribution found for keras-contrib (from mypack==0.3.5)
...
ERROR: Could not find a version that satisfies the requirement en-core-web-sm (from mypack==0.3.5) (from versions: …
Run Code Online (Sandbox Code Playgroud)

python dependencies setuptools setup.py

2
推荐指数
1
解决办法
2247
查看次数

标签 统计

dependencies ×1

python ×1

setup.py ×1

setuptools ×1