Reputation: 615
Trying to install google-cloud-aiplatform
on a Macbook with the M1 Pro chip and it gets stuck trying to install the grpcio
dependency.
I am running pip install google-cloud-aiplatform
from a Miniforge environment running python 3.9.13.
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
Upvotes: 2
Views: 1522
Reputation: 615
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
. 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
):
brew
and follow the instructions to update your PATH etc./bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
3.10.3
as the global version:brew install pyenv
pyenv global 3.10.3
pyenv-virtualenv
to create your environment:brew install pyenv-virtualenv
pyenv virtualenv 3.10.3 your_env_name
pyenv activate your_env_name
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
:pip install google-cloud-aiplatform
Hope this helps!
Upvotes: 1