如何让 python 包在 mac m1 上运行?
我正在尝试使用 instapy 构建 instagram 机器人,但在使用 Mac M1 芯片时尝试导入 instapy
时出现以下错误。
ImportError: dlopen(/venv/lib/python3.10/site-packages/grpc/_cython/cygrpc.cpython-310-darwin.so, 0x0002): tried: '/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')), '/usr/lib/cygrpc.cpython-310-darwin.so' (no such file)
实际上,在获得 mac m1 后,我最近在使用 python 软件包方面遇到了困难。我似乎找不到任何关于如何让其中一些软件包工作的信息。
如何解决此问题并修复其他有问题的软件包?
I am playing around with building an instagram bot using instapy, but I am getting the following error when trying to import instapy
when using a Mac M1 chip.
ImportError: dlopen(/venv/lib/python3.10/site-packages/grpc/_cython/cygrpc.cpython-310-darwin.so, 0x0002): tried: '/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')), '/usr/lib/cygrpc.cpython-310-darwin.so' (no such file)
I've actually been having a tough time with python packages recently after getting a mac m1. I can't seem to find anything on how to get some of these packages to work.
How can I resolve this issue and fix other packages that are having issues?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Python2
随 MacOS 一起提供,因此pip install x
可能指向Python2
。请尝试以下操作:Python2
comes with MacOS, sopip install x
may point towardsPython2
. Try the following: