根据我的研究,以下应该有效:
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)