[英]How to make pip see packages installed with homebrew?
I was having trouble installing a Python package with pip.我在使用 pip 安装 Python 包时遇到问题。 pip install gdal
failed so instead I tried installing with homebrew as suggested here , running brew install gdal
. pip install gdal
失败了,所以我尝试按照此处的建议使用自制软件进行安装,运行brew install gdal
。 This worked, but pip doesn't know the package exists, so it tries to install it when installing a package that depends on it.这有效,但 pip 不知道该软件包存在,因此它会在安装依赖于它的软件包时尝试安装它。 I want pip to be able to use packages installed by brew.我希望 pip 能够使用 brew 安装的软件包。 My computer runs MacOS 10.14 and I'm using Python 3 with pip 19.0.3 and Homebrew 2.0.2我的电脑运行 MacOS 10.14,我使用 Python 3 和 pip 19.0.3 和 Homebrew 2.0.2
The command brew install gdal
doesn't install a python package — it installs GDAL library.命令brew install gdal
不安装 python 包——它安装 GDAL 库。 After that you still have to install Python wrapper by running pip install gdal
.之后,您仍然必须通过运行pip install gdal
来安装 Python 包装器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.