https://pulumi.com logo
#python
Title
# python
b

brave-processor-54742

05/10/2022, 9:27 AM
Hi all! 👋 When doing pulumi up i am getting this error:
Copy code
ImportError: dlopen(/infrastructure/venv/lib/python3.10/site-packages/grpc/_cython/cygrpc.cpython-310-darwin.so, 0x0002): tried: '/infrastructure/venv/lib/python3.10/site-packages/grpc/_cython/cygrpc.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))
    It looks like the Pulumi SDK has not been installed. Have you run pip install?
    If you are running in a virtualenv, you must run pip install -r requirements.txt from inside the virtualenv.
Someone experienced that also? Thanks a lot!
q

quaint-eye-38036

05/10/2022, 10:16 AM
Was the python virtual environment(venv) copied from somewhere?
b

brave-processor-54742

05/10/2022, 12:50 PM
I created a new one and pip install the requirements. I solved the issue using python 3.9 instead of python 3.10
q

quaint-eye-38036

05/10/2022, 1:02 PM
Cool!. I feel the issue was that
venv
was created on a x86_64 machine. However, when you copied it to your Macbook based on arm64, it just wasn't compactible
b

brave-processor-54742

05/10/2022, 1:04 PM
I don't think so, first because the venv directory was created using pulumi up (when importing the repo venv was not included in it as it is in the gitignore), and second, I did the pulumi repo on my other macbook which is also arm64 😅
q

quaint-eye-38036

05/10/2022, 1:07 PM
Ok, I assumed the
venv
was cloned from a git repo. In that case, it's really weird issue 🤷
f

few-wolf-27303

05/10/2022, 3:34 PM
@brave-processor-54742 this fixes it for me: https://github.com/grpc/grpc/issues/28387#issuecomment-1054668742
g

great-sunset-355

05/10/2022, 6:13 PM
Pulumi tends to create venv for Python projects I like to disable this and manage venvs myself because this way I can use 1 venv for multiple projects. There is a setting for it in
Pulumi.yaml
👀 1
2 Views