Python - 安装依赖包,发现与其他包版本冲突 ResolutionImpossible

回到顶部(go to top)

问题表现

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

ERROR: ResolutionImpossible
复制代码
ERROR: Cannot install tensorboard==1.10.0, tensorboard==1.11.0, tensorboard==1.12.0, tensorboard==1.12.1, tensorboard==1.12.2, tensorboard==1.13.0, tensorboard==1.13.1, tensorboard==1.14.0, tensorboard==1.15.0, tensorboard==1.6.0, tensorboard==1.7.0, tensorboard==1.8.0, tensorboard==1.9.0, tensorboard==2.0.0, tensorboard==2.0.1, tensorboard==2.0.2, tensorboard==2.1.0, tensorboard==2.1.1, tensorboard==2.10.0, tensorboard==2.10.1, tensorboard==2.11.0, tensorboard==2.11.2, tensorboard==2.12.0, tensorboard==2.12.1, tensorboard==2.12.2, tensorboard==2.12.3, tensorboard==2.13.0, tensorboard==2.14.0, tensorboard==2.14.1, tensorboard==2.15.0, tensorboard==2.15.1, tensorboard==2.15.2, tensorboard==2.16.0, tensorboard==2.16.1, tensorboard==2.16.2, tensorboard==2.2.0, tensorboard==2.2.1, tensorboard==2.2.2, tensorboard==2.3.0, tensorboard==2.4.0, tensorboard==2.4.1, tensorboard==2.5.0, tensorboard==2.6.0, tensorboard==2.7.0, tensorboard==2.8.0, tensorboard==2.9.0 and tensorboard==2.9.1 because these package versions have conflicting dependencies.

The conflict is caused by:
    tensorboard 2.16.2 depends on grpcio>=1.48.2
    tensorboard 2.16.1 depends on grpcio>=1.48.2
    tensorboard 2.16.0 depends on grpcio>=1.48.2
    tensorboard 2.15.2 depends on grpcio>=1.48.2
    tensorboard 2.15.1 depends on grpcio>=1.48.2
    tensorboard 2.15.0 depends on grpcio>=1.48.2
    tensorboard 2.14.1 depends on grpcio>=1.48.2
    tensorboard 2.14.0 depends on grpcio>=1.48.2
    tensorboard 2.13.0 depends on grpcio>=1.48.2
    tensorboard 2.12.3 depends on grpcio>=1.48.2
    tensorboard 2.12.2 depends on grpcio>=1.48.2
    tensorboard 2.12.1 depends on grpcio>=1.48.2
    tensorboard 2.12.0 depends on grpcio>=1.48.2
    tensorboard 2.11.2 depends on grpcio>=1.24.3
    tensorboard 2.11.0 depends on grpcio>=1.24.3
    tensorboard 2.10.1 depends on grpcio>=1.24.3
    tensorboard 2.10.0 depends on grpcio>=1.24.3
    tensorboard 2.9.1 depends on grpcio>=1.24.3
    tensorboard 2.9.0 depends on grpcio>=1.24.3
    tensorboard 2.8.0 depends on grpcio>=1.24.3
    tensorboard 2.7.0 depends on grpcio>=1.24.3
    tensorboard 2.6.0 depends on grpcio>=1.24.3
    tensorboard 2.5.0 depends on grpcio>=1.24.3
    tensorboard 2.4.1 depends on grpcio>=1.24.3
    tensorboard 2.4.0 depends on grpcio>=1.24.3
    tensorboard 2.3.0 depends on grpcio>=1.24.3
    tensorboard 2.2.2 depends on grpcio>=1.24.3
    tensorboard 2.2.1 depends on grpcio>=1.24.3
    tensorboard 2.2.0 depends on grpcio>=1.24.3
    tensorboard 2.1.1 depends on grpcio>=1.24.3
    tensorboard 2.1.0 depends on grpcio>=1.24.3
    tensorboard 2.0.2 depends on grpcio>=1.24.3
    tensorboard 2.0.1 depends on grpcio>=1.24.3
    tensorboard 2.0.0 depends on grpcio>=1.6.3
    tensorboard 1.15.0 depends on grpcio>=1.6.3
    tensorboard 1.14.0 depends on grpcio>=1.6.3
    tensorboard 1.13.1 depends on grpcio>=1.6.3
    tensorboard 1.13.0 depends on grpcio>=1.6.3
    tensorboard 1.12.2 depends on grpcio>=1.6.3
    tensorboard 1.12.1 depends on grpcio>=1.6.3
    tensorboard 1.12.0 depends on grpcio>=1.6.3
    tensorboard 1.11.0 depends on grpcio>=1.6.3
    tensorboard 1.10.0 depends on protobuf>=3.4.0
    tensorboard 1.9.0 depends on protobuf>=3.4.0
    tensorboard 1.8.0 depends on protobuf>=3.4.0
    tensorboard 1.7.0 depends on protobuf>=3.4.0
    tensorboard 1.6.0 depends on protobuf>=3.4.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

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
复制代码

 

回到顶部(go to top)

解决方案

根据报错信息,tensorboard无法安装,是因为任何版本的tensorboard,都无法与现有的grpcio 、protobuf两个包兼容。

根据官网的建议:https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts 

 

把这三个包一起pip install,让pip工具自己去寻找让这三个共存的版本

pip install tensorboard protobuf grpcio
复制代码
(pytorch) xxx@xxxdeMBP learnPytorchProject % pip install tensorboard protobuf grpcio
Collecting tensorboard
  Using cached tensorboard-2.16.2-py3-none-any.whl.metadata (1.6 kB)
Collecting protobuf
  Downloading protobuf-5.26.0-cp37-abi3-macosx_10_9_universal2.whl.metadata (592 bytes)
Collecting grpcio
  Downloading grpcio-1.62.1-cp39-cp39-macosx_10_10_universal2.whl.metadata (4.0 kB)
Collecting absl-py>=0.4 (from tensorboard)
  Using cached absl_py-2.1.0-py3-none-any.whl.metadata (2.3 kB)
Collecting markdown>=2.6.8 (from tensorboard)
  Downloading Markdown-3.6-py3-none-any.whl.metadata (7.0 kB)
Requirement already satisfied: numpy>=1.12.0 in /Users/cuixun/opt/anaconda3/envs/pytorch/lib/python3.9/site-packages (from tensorboard) (1.26.4)
Requirement already satisfied: setuptools>=41.0.0 in /Users/cuixun/opt/anaconda3/envs/pytorch/lib/python3.9/site-packages (from tensorboard) (68.2.2)
Requirement already satisfied: six>1.9 in /Users/cuixun/opt/anaconda3/envs/pytorch/lib/python3.9/site-packages (from tensorboard) (1.16.0)
Collecting tensorboard-data-server<0.8.0,>=0.7.0 (from tensorboard)
  Downloading tensorboard_data_server-0.7.2-py3-none-macosx_10_9_x86_64.whl.metadata (1.1 kB)
Collecting werkzeug>=1.0.1 (from tensorboard)
  Downloading werkzeug-3.0.1-py3-none-any.whl.metadata (4.1 kB)
Requirement already satisfied: importlib-metadata>=4.4 in /Users/cuixun/opt/anaconda3/envs/pytorch/lib/python3.9/site-packages (from markdown>=2.6.8->tensorboard) (7.0.1)
Requirement already satisfied: MarkupSafe>=2.1.1 in /Users/cuixun/opt/anaconda3/envs/pytorch/lib/python3.9/site-packages (from werkzeug>=1.0.1->tensorboard) (2.1.3)
Requirement already satisfied: zipp>=0.5 in /Users/cuixun/opt/anaconda3/envs/pytorch/lib/python3.9/site-packages (from importlib-metadata>=4.4->markdown>=2.6.8->tensorboard) (3.17.0)
Downloading tensorboard-2.16.2-py3-none-any.whl (5.5 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.5/5.5 MB 11.4 kB/s eta 0:00:00
Downloading protobuf-5.26.0-cp37-abi3-macosx_10_9_universal2.whl (404 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 404.0/404.0 kB 12.9 kB/s eta 0:00:00
Downloading grpcio-1.62.1-cp39-cp39-macosx_10_10_universal2.whl (10.1 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.1/10.1 MB 13.9 kB/s eta 0:00:00
Downloading absl_py-2.1.0-py3-none-any.whl (133 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.7/133.7 kB 10.4 kB/s eta 0:00:00
Downloading Markdown-3.6-py3-none-any.whl (105 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 105.4/105.4 kB 11.9 kB/s eta 0:00:00
Downloading tensorboard_data_server-0.7.2-py3-none-macosx_10_9_x86_64.whl (4.8 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.8/4.8 MB 12.3 kB/s eta 0:00:00
Downloading werkzeug-3.0.1-py3-none-any.whl (226 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 226.7/226.7 kB 11.7 kB/s eta 0:00:00
Installing collected packages: werkzeug, tensorboard-data-server, protobuf, grpcio, absl-py, markdown, tensorboard
Successfully installed absl-py-2.1.0 grpcio-1.62.1 markdown-3.6 protobuf-5.26.0 tensorboard-2.16.2 tensorboard-data-server-0.7.2 werkzeug-3.0.1
复制代码

 

posted on   frank_cui  阅读(3763)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
历史上的今天:
2021-03-17 Redis - Redis 为什么是单线程的?为什么效率高?
2019-03-17 Leetcode - 110 判断二叉树是否为平衡二叉树
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

levels of contents
点击右上角即可分享
微信分享提示