pip冻结>需求.txt,然后是PIP install -r unigess.txt给出了错误冲突的依赖关系
我在Anaconda上有两个Python环境。两者都与Python3.8一起使用。 Env1是我完成工作的地方 Env2是测试我是否可以从头开始重现工作的测试环境。
在env1中,我创建了一个要求。txt用:
!pip list --format=freeze > requirements.txt
我没有使用,
pip freeze > requirements.txt
因为它在 @之后产生了一些直接的文件链接,而其他环境无法解决它,而其他机器肯定无法解决这些链接。
然后我转到env2,然后做:
pip install -r requirements.txt
这给了我以下错误:
ERROR: Could not find a version that satisfies the requirement sip==4.19.13 (from versions: 5.0.0, 5.0.1, 5.1.0, 5.1.1, 5.1.2, 5.2.0, 5.3.0, 5.4.0, 5.5.0, 6.0.0, 6.0.1, 6.0.2, 6.0.3, 6.1.0, 6.1.1, 6.2.0, 6.3.0, 6.3.1, 6.4.0, 6.5.0, 6.5.1, 6.6.0, 6.6.1)
ERROR: No matching distribution found for sip==4.19.13
然后我将sip == 4.19.13更改为sip> = 4.19.13,它解决了这个错误,但给出了另一个错误:
ERROR: Could not find a version that satisfies the requirement tensorboard-plugin-wit==1.6.0 (from versions: 1.6.0.post2, 1.6.0.post3, 1.7.0, 1.8.0, 1.8.1)
ERROR: No matching distribution found for tensorboard-plugin-wit==1.6.0
然后我更改tensorboard-plugin -wit == 1.6.0进入Tensorboard-Plugin-Wit> = 1.6.0,可以解决此问题并给出另一个问题。
ERROR: Cannot install -r requirements4.txt (line 17) and pycodestyle==2.7.0 because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested pycodestyle==2.7.0
autopep8 1.6.0 depends on pycodestyle>=2.8.0
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
等等。
我不明白发生了什么,这两个环境都在同一台计算机上,具有相同版本的Python和同一版本的PIP:
(test) C:\Users\ypezeu\IA\Final_product2\src>pip --version
pip 21.2.2 from C:\Users\ypezeu\anaconda3\envs\test\lib\site-packages\pip (python 3.8)
这是需求
absl-py==0.15.0
aiohttp==3.8.1
aiosignal==1.2.0
alabaster==0.7.12
anyio==3.5.0
appdirs==1.4.4
argon2-cffi==21.3.0
argon2-cffi-bindings==21.2.0
arrow==0.13.1
astor==0.8.1
astroid==2.6.6
asttokens==2.0.5
astunparse==1.6.3
async-timeout==4.0.1
atomicwrites==1.4.0
attrs==21.4.0
autopep8==1.6.0
Babel==2.9.1
backcall==0.2.0
bcrypt==3.2.0
beautifulsoup4==4.11.1
binaryornot==0.4.4
black==19.10b0
bleach==4.1.0
blinker==1.4
Bottleneck==1.3.2
brotlipy==0.7.0
cachetools==4.2.2
certifi==2021.10.8
cffi==1.15.0
chardet==4.0.0
charset-normalizer==2.0.4
click==8.0.4
cloudpickle==2.0.0
colorama==0.4.4
cookiecutter==1.7.2
cryptography==3.4.8
cycler==0.11.0
debugpy==1.5.1
decorator==5.1.1
defusedxml==0.7.1
diff-match-patch==20200713
dm-tree==0.1.5
docutils==0.17.1
entrypoints==0.3
executing==0.8.3
fastjsonschema==2.15.3
flake8==3.9.2
flatbuffers==2.0
fonttools==4.25.0
frozenlist==1.2.0
gast==0.3.3
gitdb==4.0.9
GitPython==3.1.27
google-auth==2.6.0
google-auth-oauthlib==0.4.4
google-pasta==0.2.0
grpcio==1.42.0
h5py==2.10.0
idna==3.3
imagesize==1.3.0
importlib-metadata==4.8.2
inflection==0.5.1
intervaltree==3.1.0
ipykernel==6.9.1
ipython==8.1.1
ipython-genutils==0.2.0
isort==5.9.3
jedi==0.18.1
Jinja2<=3.1.2
jinja2-time==0.2.0
joblib==1.1.0
jsonschema==3.2.0
jupyter-client==6.1.12
jupyter-contrib-core==0.3.3
jupyter-contrib-nbextensions==0.5.1
jupyter-core==4.9.2
jupyter-highlight-selected-word==0.2.0
jupyter-latex-envs==1.4.6
jupyter-nbextensions-configurator==0.4.1
jupyter-server==1.17.0
jupyter-server-mathjax==0.2.5
jupyterlab-pygments==0.1.2
keras==2.8.0
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.2
keras-tcn==3.4.2
keyring==23.4.0
kiwisolver==1.3.2
lazy-object-proxy==1.6.0
libclang==13.0.0
lightgbm==3.2.1
lxml==4.8.0
Markdown==3.3.4
MarkupSafe==2.1.1
matplotlib==3.5.1
matplotlib-inline==0.1.2
mccabe==0.6.1
mistune==0.8.4
mkl-fft==1.3.1
mkl-random==1.2.2
mkl-service==2.4.0
multidict==5.1.0
munkres==1.1.4
mypy-extensions==0.4.3
nbclient==0.5.11
nbconvert==6.5.0
nbdime==3.1.1
nbformat==5.4.0
nest-asyncio==1.5.1
notebook==6.4.8
numexpr==2.8.1
numpy==1.22.3
numpydoc==1.2
oauthlib==3.2.0
opt-einsum==3.3.0
packaging==21.3
pandas==1.4.1
pandocfilters==1.5.0
paramiko==2.8.1
parso==0.8.3
pathspec==0.7.0
patsy==0.5.2
pexpect==4.8.0
pickleshare==0.7.5
Pillow==9.0.1
pip==21.2.2
pluggy==1.0.0
poyo==0.5.0
prometheus-client==0.13.1
prompt-toolkit==3.0.20
protobuf==3.19.1
psutil==5.8.0
ptyprocess==0.7.0
pure-eval==0.2.2
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycodestyle>=2.7.0
pycparser==2.21
pydocstyle==6.1.1
pyflakes==2.3.1
Pygments==2.11.2
PyJWT==2.1.0
pylint==2.9.6
pyls-spyder==0.4.0
PyNaCl==1.4.0
pyOpenSSL==21.0.0
pyparsing==3.0.4
pyreadline==2.1
pyrsistent==0.18.0
PySocks==1.7.1
python-dateutil==2.8.2
python-lsp-black==1.0.0
python-lsp-jsonrpc==1.0.0
python-lsp-server==1.2.4
python-slugify==5.0.2
pytz==2021.3
pywin32==302
pywin32-ctypes==0.2.0
pywinpty==2.0.2
PyYAML==6.0
pyzmq==22.3.0
QDarkStyle==3.0.2
qstylizer==0.1.10
QtAwesome==1.0.3
qtconsole==5.2.2
QtPy==1.11.2
recordtype==1.3
regex==2021.8.3
requests==2.27.1
requests-oauthlib==1.3.0
rope==0.22.0
rsa==4.7.2
Rtree==0.9.7
scikit-learn==1.0.2
scipy==1.4.1
seaborn==0.11.2
Send2Trash==1.8.0
setuptools==58.0.4
six==1.16.0
smmap==5.0.0
sniffio==1.2.0
snowballstemmer==2.2.0
sortedcontainers==2.4.0
soupsieve==2.3.2.post1
Sphinx==4.4.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
spyder==5.1.5
spyder-kernels==2.1.3
stack-data==0.2.0
statsmodels==0.13.0
tensorboard==2.8.0
tensorboard-data-server==0.6.1
tensorboard-plugin-wit>=1.6.0
tensorflow==2.8.0
tensorflow-addons==0.16.1
tensorflow-estimator==2.3.0
tensorflow-hub==0.8.0
tensorflow-io-gcs-filesystem==0.24.0
tensorflow-probability==0.14.0
termcolor==1.1.0
terminado==0.13.1
testpath==0.5.0
text-unidecode==1.3
textdistance==4.2.1
tf-estimator-nightly==2.8.0.dev2021122109
threadpoolctl==2.2.0
three-merge==0.1.1
tinycss==0.4
tinycss2==1.1.1
toml==0.10.2
tornado==6.1
tqdm==4.63.0
traitlets==5.1.1
typed-ast==1.4.3
typeguard==2.13.3
typing-extensions==3.10.0.2
ujson==4.0.2
Unidecode==1.2.0
urllib3==1.26.8
watchdog==2.1.6
wcwidth==0.2.5
webencodings==0.5.1
websocket-client==1.3.2
Werkzeug==2.0.3
wheel==0.37.1
whichcraft==0.6.1
win-inet-pton==1.1.0
wincertstore==0.2
wrapt==1.12.1
yapf==0.31.0
yarl==1.6.3
zipp==3.7.0
。 txt正在工作?为什么我要有这个错误?
I have two python environments on anaconda. Both are with python3.8.
Env1 is where I did my work
Env2 is a test environment to test if I can reproduce my work from scratch.
Within Env1 I create a requirements.txt with:
!pip list --format=freeze > requirements.txt
I did not use
pip freeze > requirements.txt
Because it produces some direct file links after @ and the other environment can't resolve it and other machines would definitely be unable to resolve those links.
Then I go to Env2 and I do:
pip install -r requirements.txt
This gives me the following error:
ERROR: Could not find a version that satisfies the requirement sip==4.19.13 (from versions: 5.0.0, 5.0.1, 5.1.0, 5.1.1, 5.1.2, 5.2.0, 5.3.0, 5.4.0, 5.5.0, 6.0.0, 6.0.1, 6.0.2, 6.0.3, 6.1.0, 6.1.1, 6.2.0, 6.3.0, 6.3.1, 6.4.0, 6.5.0, 6.5.1, 6.6.0, 6.6.1)
ERROR: No matching distribution found for sip==4.19.13
Then I change the sip==4.19.13 into sip>=4.19.13 which resolves this error but gives an other one:
ERROR: Could not find a version that satisfies the requirement tensorboard-plugin-wit==1.6.0 (from versions: 1.6.0.post2, 1.6.0.post3, 1.7.0, 1.8.0, 1.8.1)
ERROR: No matching distribution found for tensorboard-plugin-wit==1.6.0
Then I change the tensorboard-plugin-wit==1.6.0 into tensorboard-plugin-wit>=1.6.0 which resolves this issue and gives another one.
ERROR: Cannot install -r requirements4.txt (line 17) and pycodestyle==2.7.0 because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested pycodestyle==2.7.0
autopep8 1.6.0 depends on pycodestyle>=2.8.0
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
And so on and so on.
I don't understand what is happening, both environments are on the same machine, with the same version of python and the same version of pip:
(test) C:\Users\ypezeu\IA\Final_product2\src>pip --version
pip 21.2.2 from C:\Users\ypezeu\anaconda3\envs\test\lib\site-packages\pip (python 3.8)
Here is the requirements.txt file:
absl-py==0.15.0
aiohttp==3.8.1
aiosignal==1.2.0
alabaster==0.7.12
anyio==3.5.0
appdirs==1.4.4
argon2-cffi==21.3.0
argon2-cffi-bindings==21.2.0
arrow==0.13.1
astor==0.8.1
astroid==2.6.6
asttokens==2.0.5
astunparse==1.6.3
async-timeout==4.0.1
atomicwrites==1.4.0
attrs==21.4.0
autopep8==1.6.0
Babel==2.9.1
backcall==0.2.0
bcrypt==3.2.0
beautifulsoup4==4.11.1
binaryornot==0.4.4
black==19.10b0
bleach==4.1.0
blinker==1.4
Bottleneck==1.3.2
brotlipy==0.7.0
cachetools==4.2.2
certifi==2021.10.8
cffi==1.15.0
chardet==4.0.0
charset-normalizer==2.0.4
click==8.0.4
cloudpickle==2.0.0
colorama==0.4.4
cookiecutter==1.7.2
cryptography==3.4.8
cycler==0.11.0
debugpy==1.5.1
decorator==5.1.1
defusedxml==0.7.1
diff-match-patch==20200713
dm-tree==0.1.5
docutils==0.17.1
entrypoints==0.3
executing==0.8.3
fastjsonschema==2.15.3
flake8==3.9.2
flatbuffers==2.0
fonttools==4.25.0
frozenlist==1.2.0
gast==0.3.3
gitdb==4.0.9
GitPython==3.1.27
google-auth==2.6.0
google-auth-oauthlib==0.4.4
google-pasta==0.2.0
grpcio==1.42.0
h5py==2.10.0
idna==3.3
imagesize==1.3.0
importlib-metadata==4.8.2
inflection==0.5.1
intervaltree==3.1.0
ipykernel==6.9.1
ipython==8.1.1
ipython-genutils==0.2.0
isort==5.9.3
jedi==0.18.1
Jinja2<=3.1.2
jinja2-time==0.2.0
joblib==1.1.0
jsonschema==3.2.0
jupyter-client==6.1.12
jupyter-contrib-core==0.3.3
jupyter-contrib-nbextensions==0.5.1
jupyter-core==4.9.2
jupyter-highlight-selected-word==0.2.0
jupyter-latex-envs==1.4.6
jupyter-nbextensions-configurator==0.4.1
jupyter-server==1.17.0
jupyter-server-mathjax==0.2.5
jupyterlab-pygments==0.1.2
keras==2.8.0
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.2
keras-tcn==3.4.2
keyring==23.4.0
kiwisolver==1.3.2
lazy-object-proxy==1.6.0
libclang==13.0.0
lightgbm==3.2.1
lxml==4.8.0
Markdown==3.3.4
MarkupSafe==2.1.1
matplotlib==3.5.1
matplotlib-inline==0.1.2
mccabe==0.6.1
mistune==0.8.4
mkl-fft==1.3.1
mkl-random==1.2.2
mkl-service==2.4.0
multidict==5.1.0
munkres==1.1.4
mypy-extensions==0.4.3
nbclient==0.5.11
nbconvert==6.5.0
nbdime==3.1.1
nbformat==5.4.0
nest-asyncio==1.5.1
notebook==6.4.8
numexpr==2.8.1
numpy==1.22.3
numpydoc==1.2
oauthlib==3.2.0
opt-einsum==3.3.0
packaging==21.3
pandas==1.4.1
pandocfilters==1.5.0
paramiko==2.8.1
parso==0.8.3
pathspec==0.7.0
patsy==0.5.2
pexpect==4.8.0
pickleshare==0.7.5
Pillow==9.0.1
pip==21.2.2
pluggy==1.0.0
poyo==0.5.0
prometheus-client==0.13.1
prompt-toolkit==3.0.20
protobuf==3.19.1
psutil==5.8.0
ptyprocess==0.7.0
pure-eval==0.2.2
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycodestyle>=2.7.0
pycparser==2.21
pydocstyle==6.1.1
pyflakes==2.3.1
Pygments==2.11.2
PyJWT==2.1.0
pylint==2.9.6
pyls-spyder==0.4.0
PyNaCl==1.4.0
pyOpenSSL==21.0.0
pyparsing==3.0.4
pyreadline==2.1
pyrsistent==0.18.0
PySocks==1.7.1
python-dateutil==2.8.2
python-lsp-black==1.0.0
python-lsp-jsonrpc==1.0.0
python-lsp-server==1.2.4
python-slugify==5.0.2
pytz==2021.3
pywin32==302
pywin32-ctypes==0.2.0
pywinpty==2.0.2
PyYAML==6.0
pyzmq==22.3.0
QDarkStyle==3.0.2
qstylizer==0.1.10
QtAwesome==1.0.3
qtconsole==5.2.2
QtPy==1.11.2
recordtype==1.3
regex==2021.8.3
requests==2.27.1
requests-oauthlib==1.3.0
rope==0.22.0
rsa==4.7.2
Rtree==0.9.7
scikit-learn==1.0.2
scipy==1.4.1
seaborn==0.11.2
Send2Trash==1.8.0
setuptools==58.0.4
six==1.16.0
smmap==5.0.0
sniffio==1.2.0
snowballstemmer==2.2.0
sortedcontainers==2.4.0
soupsieve==2.3.2.post1
Sphinx==4.4.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
spyder==5.1.5
spyder-kernels==2.1.3
stack-data==0.2.0
statsmodels==0.13.0
tensorboard==2.8.0
tensorboard-data-server==0.6.1
tensorboard-plugin-wit>=1.6.0
tensorflow==2.8.0
tensorflow-addons==0.16.1
tensorflow-estimator==2.3.0
tensorflow-hub==0.8.0
tensorflow-io-gcs-filesystem==0.24.0
tensorflow-probability==0.14.0
termcolor==1.1.0
terminado==0.13.1
testpath==0.5.0
text-unidecode==1.3
textdistance==4.2.1
tf-estimator-nightly==2.8.0.dev2021122109
threadpoolctl==2.2.0
three-merge==0.1.1
tinycss==0.4
tinycss2==1.1.1
toml==0.10.2
tornado==6.1
tqdm==4.63.0
traitlets==5.1.1
typed-ast==1.4.3
typeguard==2.13.3
typing-extensions==3.10.0.2
ujson==4.0.2
Unidecode==1.2.0
urllib3==1.26.8
watchdog==2.1.6
wcwidth==0.2.5
webencodings==0.5.1
websocket-client==1.3.2
Werkzeug==2.0.3
wheel==0.37.1
whichcraft==0.6.1
win-inet-pton==1.1.0
wincertstore==0.2
wrapt==1.12.1
yapf==0.31.0
yarl==1.6.3
zipp==3.7.0
Could you please explain to me how to produce a requirements.txt that is working ? And why do I have this error please ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论