python - 在 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 pip
并which 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 不能解决所有未满足的依赖项?可以做些什么来解决这个问题?
解决方案
推荐阅读
- python - 用于设置 python.autoComplete.extraPath 的 VSCode Python 动态路径
- avaudioengine - 在不停止声音的情况下动态重新连接 AVAudioEngine 节点
- python-3.x - 如何使用 Python 3.7 模拟 Google API 库以进行单元测试
- javascript - 在 if 条件下不能通过 JQuery 方法?
- python - 是否可以在调用 lamda 函数中使用组聚合?
- python - Python:timedelta 其他方式比较时间,同时每增加一个小时
- javascript - 在Javascript中,子节点因其父节点而受到影响
- sql-server - MS SQL sp_add_schedule 指定多个频率间隔
- python - 具有列表字符串表示的熊猫数据框列上的正则表达式
- javascript - 无法清除 select2