简体   繁体   English

(mach-o 文件,但架构不兼容(有'x86_64',需要'arm64e'))

[英](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 缓存信息找到的整个缓存目录

Go to Applications -> Xcode, then right click and select get info. Go 到 Applications -> Xcode,然后右键单击并 select 获取信息。 Then enable checbox "Open using Rosetta"然后启用复选框“使用 Rosetta 打开” 在此处输入图像描述

Finally close Xcode and open it and try again.最后关闭 Xcode 并打开它再试一次。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Mac 上的 pyreadstat 导入错误:mach-o 文件,但架构不兼容(具有“x86_64”,需要“arm64e”) - pyreadstat Import Error on Mac: mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e') mach-o 文件,但架构不兼容,有 'x86_64',需要 'arm64e' M1 MAC - mach-o file, but is an incompatible architecture have 'x86_64', need 'arm64e' M1 MAC 无法在使用 miniforge 的 M1 mac 上导入 psutil:(mach-o 文件,但架构不兼容(具有 'x86_64',需要 'arm64e')) - Unable to import psutil on M1 mac with miniforge: (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')) “from cplex import *”命令在 VScode 中得到一个错误,说“... mach-o 文件,但是是一个不兼容的架构(有 'x86_64',需要 'arm64e')” - "from cplex import *" command get an Error in VScode saying "... mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')" Python 导入获取mach-o文件,但架构不兼容(有'x86_64',需要'arm64e' M2 Mac - Python Import get mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' M2 Mac (mach-o 文件,但它是一个不兼容的架构(有 'arm64',需要 'x86_64')) - (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')) 导入错误 confluent_kafka mach-o 文件,但是是不兼容的架构(有(arm64),需要(x86_64))) - import error confluent_kafka mach-o file, but is an incompatible architecture (have (arm64), need (x86_64))) Ortools 安装错误 (x86) - mach-o 文件,但架构不兼容(有 'arm64',需要 'x86_64h') - Error in Ortools installation (x86) - mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64h') arch x86_64 和 arm64e 可用但 python3 在 Mac M1 上说不兼容的架构 - arch x86_64 and arm64e is available but python3 is saying incompatible architecture on Mac M1 尝试在 Atom 中导入 numpy 时出现“不兼容的架构(有 'arm64',需要 'x86_64')”错误 - 'incompatible architecture (have 'arm64', need 'x86_64')' error when trying to import numpy in Atom
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM