首页 > 解决方案 > 在 Conda 虚拟环境中运行 PIP 时有关未解决依赖项的错误消息

问题描述

我在Manjaro-stable上运行 zsh shell,并使用Python 3.9.2激活了Conda (4.10.1)虚拟环境,当我尝试通过它安装包时,有时会返回有关未解决依赖项的错误消息。例如,当我尝试安装 Tensorflow 时:pip install

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
pyxnat 1.4 requires future>=0.16, which is not installed.
nipype 1.6.0 requires filelock>=3.0.0, which is not installed.

我使用安装 pipconda install pipwhich pip返回:

/home/gova/anaconda3/envs/drmdef/bin/pip

当我尝试通过 shell 导入 Tensorflow 时,我得到了这样的回应:

Python 3.9.2 | packaged by conda-forge | (default, Feb 21 2021, 05:02:46) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
2021-04-17 18:21:18.145981: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
2021-04-17 18:21:18.146004: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
INFO:tensorflow:Enabling eager execution
INFO:tensorflow:Enabling v2 tensorshape
INFO:tensorflow:Enabling resource variables
INFO:tensorflow:Enabling tensor equality
INFO:tensorflow:Enabling control flow v2
>>> 

这意味着 TensorFlow 确实已安装并可导入。这些错误消息不是问题,因为我还没有开始为 TensorFlow 配置系统。但与此相关的任何事情也会有所帮助。


为什么我会看到该错误消息?为什么 pip 不能解决所有未满足的依赖项?可以做些什么来解决这个问题?

标签: pythonpython-3.xlinuxtensorflowpip

解决方案


推荐阅读