https://prefect.io logo
Title
l

Lucas Zago

05/02/2023, 7:50 PM
How to install prefect in mac m2? Following pip install -U prefect I was not able to install it
1
n

Nate

05/02/2023, 9:23 PM
hi @Lucas Zago - can you share your error?
l

Lucas Zago

05/02/2023, 10:25 PM
follow my error bellow: prefect version
Traceback (most recent call last):
File "/Users/lzago/opt/anaconda3/envs/de_gcp/bin/prefect", line 5, in <module>
from prefect.cli import app
File "/Users/lzago/opt/anaconda3/envs/de_gcp/lib/python3.9/site-packages/prefect/__init__.py", line 25, in <module>
from prefect.states import State
File "/Users/lzago/opt/anaconda3/envs/de_gcp/lib/python3.9/site-packages/prefect/states.py", line 14, in <module>
from prefect.client.schemas import State as State
File "/Users/lzago/opt/anaconda3/envs/de_gcp/lib/python3.9/site-packages/prefect/client/schemas.py", line 6, in <module>
from prefect.server import schemas
File "/Users/lzago/opt/anaconda3/envs/de_gcp/lib/python3.9/site-packages/prefect/server/__init__.py", line 1, in <module>
from . import models
File "/Users/lzago/opt/anaconda3/envs/de_gcp/lib/python3.9/site-packages/prefect/server/models/__init__.py", line 1, in <module>
from . import (
File "/Users/lzago/opt/anaconda3/envs/de_gcp/lib/python3.9/site-packages/prefect/server/models/block_documents.py", line 13, in <module>
from prefect.server import schemas
File "/Users/lzago/opt/anaconda3/envs/de_gcp/lib/python3.9/site-packages/prefect/server/schemas/__init__.py", line 1, in <module>
from . import states, schedules, core, sorting, filters, responses, actions
File "/Users/lzago/opt/anaconda3/envs/de_gcp/lib/python3.9/site-packages/prefect/server/schemas/states.py", line 13, in <module>
from prefect.server.utilities.schemas import DateTimeTZ, IDBaseModel, PrefectBaseModel
File "/Users/lzago/opt/anaconda3/envs/de_gcp/lib/python3.9/site-packages/prefect/server/utilities/schemas.py", line 13, in <module>
import orjson
File "/Users/lzago/opt/anaconda3/envs/de_gcp/lib/python3.9/site-packages/orjson/__init__.py", line 3, in <module>
from .orjson import *
ImportError: dlopen(/Users/lzago/opt/anaconda3/envs/de_gcp/lib/python3.9/site-packages/orjson/orjson.cpython-39-darwin.so, 0x0002): tried: '/Users/lzago/opt/anaconda3/envs/de_gcp/lib/python3.9/site-packages/orjson/orjson.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/lzago/opt/anaconda3/envs/de_gcp/lib/python3.9/site-packages/orjson/orjson.cpython-39-darwin.so' (no such file), '/Users/lzago/opt/anaconda3/envs/de_gcp/lib/python3.9/site-packages/orjson/orjson.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
I run: pip install -U prefect, after ckecked the version and I got the error above @Nate
just give an answer: I uninstalled the the orjson-3.8.11 version and installed version 3.8.1, it works !
🙌 1
n

Nate

05/03/2023, 3:33 AM
thank you for sharing your solution! glad you figured it out 🙂
j

Jeff Hale

05/04/2023, 1:49 PM
Hi Lucas. Glad it’s working. I saw another issue or two with orjson and M1 or M2 macs, and trying to get a few more details. Could you please let me know the following: 1. What’s your Python version? 2. What’s your Prefect version? 3. Did you install Prefect from Pypi or conda?
l

Lucas Zago

05/05/2023, 5:47 PM
Hi Jeff follow answers: 1. Python 3.9.16 2. 2.10.6 3. Pypi
:thank-you: 1