python - 安装numpy时的循环依赖
问题描述
我正在尝试在我的 virtualenv 中安装 numpy,但我面临如下循环依赖:
(test) [hadoop@ip-192-168-26-8 test]$ python -m pip install numpy
Collecting numpy
Using cached https://files.pythonhosted.org/packages/62/20/4d43e141b5bc426ba38274933ef8e76e85c7adea2c321ecf9ebf7421cedf/numpy-1.18.1-cp36-cp36m-manylinux1_x86_64.whl
ERROR: tensorboard 2.1.0 requires grpcio>=1.24.3, which is not installed.
ERROR: tensorboard 2.1.0 requires markdown>=2.6.8, which is not installed.
ERROR: tensorboard 2.1.0 requires protobuf>=3.6.0, which is not installed.
ERROR: tensorboard 2.1.0 requires werkzeug>=0.11.15, which is not installed.
Installing collected packages: numpy
Successfully installed numpy-1.18.1
然后当我尝试安装 grpcio
(test) [hadoop@ip-192-168-26-8 test]$ python -m pip install grpcio
Collecting grpcio
Using cached https://files.pythonhosted.org/packages/17/8f/f79c5c174bebece41f824dd7b1ba98da45dc2d4c373b38ac6a7f6a5acb5e/grpcio-1.26.0-cp36-cp36m-manylinux2010_x86_64.whl
Requirement already satisfied: six>=1.5.2 in ./lib/python3.6/dist-packages (from grpcio) (1.14.0)
ERROR: tensorboard 2.1.0 requires markdown>=2.6.8, which is not installed.
ERROR: tensorboard 2.1.0 requires numpy>=1.12.0, which is not installed.
ERROR: tensorboard 2.1.0 requires protobuf>=3.6.0, which is not installed.
ERROR: tensorboard 2.1.0 requires werkzeug>=0.11.15, which is not installed.
Installing collected packages: grpcio
Successfully installed grpcio-1.26.0
我什至不确定为什么它给了我不正确的提示Successfully installed grpcio-1.26.0
,因为当我使用 list 命令时它们没有被添加到我的 pip 中。
解决方案
您介意使用以下命令卸载 numpy:
pip uninstall numpy
并使用 --no-cache-dir 选项再次安装它:
pip install numpy --no-cache-dir
另外,请参阅 pip 已升级。
推荐阅读
- ios - 如何在没有 segue 的情况下使用通知中心将数据从 FirstTableView 发送到 SecondTableView
- css - 当顶栏使用像素时,如何让侧边栏占据页面的 90%?
- python-3.x - 如何在 Pandas 中保存用户输入而不在同一行上覆盖数据
- typescript - 具有泛型和部分的类上的打字稿错误
- php - Wordpress 子主题中的多个 css 文件
- swift - Alamofire 的 .responseString 方法有什么用?
- c# - Serilog 中范围的临时日志记录抑制
- javascript - 表格行中包含的输入字段存在问题,无法为它们设置值
- svg - 自定义嵌入的 SVG 字形不呈现
- javascript - 在同一组件中包装提供程序抛出元素类型无效:期望字符串(用于内置组件)或类/函数但得到:对象