[英]Can't install google-cloud-aiplatform on Apple M1 silicon - Fails on grpcio
Trying to install google-cloud-aiplatform
on a Macbook with the M1 Pro chip and it gets stuck trying to install the grpcio
dependency.尝试在带有 M1 Pro 芯片的 Macbook 上安装
google-cloud-aiplatform
时,尝试安装grpcio
依赖项时卡住了。
I am running pip install google-cloud-aiplatform
from a Miniforge environment running python 3.9.13.我在运行 python 3.9.13 的 Miniforge 环境中运行
pip install google-cloud-aiplatform
aiplatform。
The error trace is massive, and I can edit to share more if needed but the last few lines say:错误跟踪很大,如果需要,我可以编辑以共享更多信息,但最后几行说:
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> grpcio
note: This is an issue with the package mentioned above, not pip.
Thanks谢谢
Fixed this annoying issue by using pyenv
(with python 3.10) rather than Miniforge
and installing version 1.44.0 of grpcio
before google-cloud-aiplatform
.通过使用
pyenv
(使用 python 3.10)而不是Miniforge
并在google-cloud-aiplatform
grpcio
安装 grpcio 1.44.0 版本,解决了这个烦人的问题。 I do not know why this works, so if anybody can shed some light into it that would be great!我不知道为什么会这样,所以如果有人能对此有所了解,那就太好了! But if you need to get it working and are ok using
pyenv
then below are the steps I took (I used brew
to install pyenv
):但是如果你需要让它工作并且可以使用
pyenv
那么下面是我采取的步骤(我使用brew
来安装pyenv
):
brew
and follow the instructions to update your PATH etc.brew
并按照说明更新您的 PATH 等。/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
3.10.3
as the global version:3.10.3
设置为全局版本:brew install pyenv
pyenv global 3.10.3
pyenv-virtualenv
to create your environment: pyenv-virtualenv
创建您的环境:brew install pyenv-virtualenv
pyenv virtualenv 3.10.3 your_env_name
pyenv activate your_env_name
grpcio
:grpcio
:pip install --upgrade pip
pip install -v https://files.pythonhosted.org/packages/65/75/8b706e1170e2c7b6242b1675259e47986bb4fc490f29387989a965972e6e/grpcio-1.44.0.tar.gz
google-cloud-aiplatform
:google-cloud-aiplatform
:pip install google-cloud-aiplatform
Hope this helps!希望这可以帮助!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.