[X] I have searched GitHub for a duplicate issue and I'm sure this is something new
[X] I have searched Google & StackOverflow for a solution and couldn't find anything
[X] I have read and followed the docs and still think this is a bug
[X] I am confident that the issue is with pydantic (not my code, or another library in the ecosystem like FastAPI or mypy)
Description
When running a fastapi project using poetry, shows an error displaying:
ImportError: dlopen(/Users/jorgelopez/Library/Caches/pypoetry/virtualenvs/jlo-blog-qkDVX_54-py3.9/lib/python3.9/site-packages/pydantic/init.cpython-39-darwin.so, 0x0002): tried: '/Users/jorgelopez/Library/Caches/pypoetry/virtualenvs/jlo-blog-qkDVX_54-py3.9/lib/python3.9/site-packages/pydantic/init.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/jorgelopez/Library/Caches/pypoetry/virtualenvs/jlo-blog-qkDVX_54-py3.9/lib/python3.9/site-packages/pydantic/init.cpython-39-darwin.so' (no such file), '/Users/jorgelopez/Library/Caches/pypoetry/virtualenvs/jlo-blog-qkDVX_54-py3.9/lib/python3.9/site-packages/pydantic/init.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
Initial Checks
Description
When running a fastapi project using poetry, shows an error displaying:
ImportError: dlopen(/Users/jorgelopez/Library/Caches/pypoetry/virtualenvs/jlo-blog-qkDVX_54-py3.9/lib/python3.9/site-packages/pydantic/init.cpython-39-darwin.so, 0x0002): tried: '/Users/jorgelopez/Library/Caches/pypoetry/virtualenvs/jlo-blog-qkDVX_54-py3.9/lib/python3.9/site-packages/pydantic/init.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/jorgelopez/Library/Caches/pypoetry/virtualenvs/jlo-blog-qkDVX_54-py3.9/lib/python3.9/site-packages/pydantic/init.cpython-39-darwin.so' (no such file), '/Users/jorgelopez/Library/Caches/pypoetry/virtualenvs/jlo-blog-qkDVX_54-py3.9/lib/python3.9/site-packages/pydantic/init.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
Example Code
No response
Python, Pydantic & OS Version
Affected Components
.model_dump()
and.model_dump_json()
model_construct()
, pickling, private attributes, ORM mode