英文:
rpy2 loading error with MacOS 13.5 and m1 chip
问题
我在尝试在Jupyter Notebook(Python)上执行%load_ext rpy2.ipython
时遇到以下错误。
错误:
> OSError: 无法加载库 '/Library/Frameworks/R.framework/Resources/lib/libR.dylib': dlopen(/Library/Frameworks/R.framework/Resources/lib/libR.dylib, 0x0002): 尝试: '/Library/Frameworks/R.framework/Resources/lib/libR.dylib' (mach-o文件,但是不兼容的架构(有 'arm64',需要 'x86_64' )), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/R.framework/Resources/lib/libR.dylib' (没有这个文件), '/Library/Frameworks/R.framework/Resources/lib/libR.dylib' (mach-o文件,但是不兼容的架构(有 'arm64',需要 'x86_64')), '/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libR.dylib' (mach-o文件,但是不兼容的架构(有 'arm64',需要 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libR.dylib' (没有这个文件), '/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libR.dylib' (mach-o文件,但是不兼容的架构(有 'arm64',需要 'x86_64'))
我使用的是MacOS 13.5,我的Mac上有M1芯片。
对于这个问题有任何想法吗?如何在我的环境中使用rpy2?谢谢!
英文:
I have the following error when trying to do %load_ext rpy2.ipython
on Jupyter Notebook (Python).
Error:
> OSError: cannot load library '/Library/Frameworks/R.framework/Resources/lib/libR.dylib': dlopen(/Library/Frameworks/R.framework/Resources/lib/libR.dylib, 0x0002): tried: '/Library/Frameworks/R.framework/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/R.framework/Resources/lib/libR.dylib' (no such file), '/Library/Frameworks/R.framework/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libR.dylib' (no such file), '/Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libR.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
I am using MacOS 13.5 and my Mac has m1 chip.
Any idea about the issue? How to use rpy2 in my environment? Thanks!
答案1
得分: 0
我通过在我的Mac上安装R-x86_64.pkg也解决了这个问题。
英文:
I figure it out by installing R-x86_64.pkg as well on my Mac.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论