[英](mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))
Followed this guide ( Cannot pip install mediapipe on Macos M1 ) to install Mediapipe on M1 mac, and now I am unable to use pandas or numpy.按照本指南( Cannot pip install mediapipe on Macos M1 )在 M1 mac 上安装 Mediapipe,现在我无法使用 pandas 或 numpy。
ImportError: dlopen(/Users/matthewcuevas/Library/Python/3.8/lib/python/site-packages/pandas/_libs/interval.cpython-38-darwin.so, 0x0002): tried: '/Users/matthewcuevas/Library/Python/3.8/lib/python/site-packages/pandas/_libs/interval.cpython-38-darwin.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')) ImportError:dlopen(/Users/matthewcuevas/Library/Python/3.8/lib/python/site-packages/pandas/_libs/interval.cpython-38-darwin.so,0x0002):尝试:'/Users/matthewcuevas/Library/ Python/3.8/lib/python/site-packages/pandas/_libs/interval.cpython-38-darwin.so'(mach-o 文件,但架构不兼容(有'arm64',需要'x86_64'))
This will not be answer to your question/specific situation (most probably), but I got this issue when using python built for pyenv/virtualenv, and rm -rf ~/.pyenv
helped me.这不会回答您的问题/具体情况(很可能),但我在使用为 pyenv/virtualenv 构建的 python 时遇到了这个问题,并且rm -rf ~/.pyenv
帮助了我。 So, python was reinstalled (properly this time; reinstalled by other scripts in our CI, because I deleted installation), and it's built for x86 and works fine on arm.因此,重新安装了 python(这次是正确的;由我们 CI 中的其他脚本重新安装,因为我删除了安装),它是为 x86 构建的,并且在 ZF926B3E222D7AFEE57071B2256183970 上工作正常
I got an error like this too.我也遇到了这样的错误。 Solved it after a lot of trial & error.经过大量的试验和错误后解决了。
The Problem: my brew was still running on Rosetta.问题:我的 brew 仍在 Rosetta 上运行。 Fixed that by uninstalling, cleaning and reinstalling.通过卸载、清理和重新安装来解决这个问题。 So everything seemed to run fine.所以一切似乎都运行良好。 Except this problem still kept cropping up除了这个问题仍然不断出现
Until I discovered that pip is quite agressive in caching.直到我发现 pip 在缓存方面相当激进。 So it caches the build even if the architecture changed.因此,即使架构发生变化,它也会缓存构建。 Solution: pip cache purge.解决方案:pip 缓存清除。 Or remove the whole cache directory which you find with pip cache info或者删除您使用 pip 缓存信息找到的整个缓存目录
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.