在M1 Mac上迁移的问题:GEO不兼容体系结构
我已经通过设置了,并且在迁移我的应用程序(在VENV内)遇到问题。当我运行python manage.py migrate
我收到此错误:
OSError: dlopen(/opt/homebrew/opt/geos/lib/libgeos_c.dylib, 0x0006):
tried: '/opt/homebrew/opt/geos/lib//libgeos_c.dylib' (mach-o file, but is
an incompatible architecture (have 'arm64', need 'x86_64')),
'/opt/homebrew/opt/geos/lib/libgeos_c.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/opt/homebrew/opt/geos/lib//libgeos_c.1.16.0.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/opt/homebrew/Cellar/geos/3.10.2/lib/libgeos_c.1.16.0.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
我已经尝试了此问题的答案(在OSX上丢失了libgeos_c.so ),但它们都不为我工作。我还尝试将添加dyld_library_path =/opt/opt/homebrew/opt/geos/lib/code>到我的〜/.bash_profile。
file/opt/homebrew/cellar/geos/3.10.2/lib/libgeos.dylib
=
/opt/homebrew/Cellar/geos/3.10.2/lib/libgeos.dylib: Mach-O 64-bit dynamically linked shared library arm64
file> file $(python3)
=
/Users/danieljohnson/Documents/code/project/venv/bin/python3 (for architecture x86_64): Mach-O 64-bit executable x86_64
/Users/danieljohnson/Documents/code/project/venv/bin/python3 (for architecture arm64): Mach-O 64-bit executable arm64
我 的输出不确定从这里去哪里。
I have run through a setup and I'm having issues migrating my app (within my venv). When I run python manage.py migrate
I recevie this error:
OSError: dlopen(/opt/homebrew/opt/geos/lib/libgeos_c.dylib, 0x0006):
tried: '/opt/homebrew/opt/geos/lib//libgeos_c.dylib' (mach-o file, but is
an incompatible architecture (have 'arm64', need 'x86_64')),
'/opt/homebrew/opt/geos/lib/libgeos_c.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/opt/homebrew/opt/geos/lib//libgeos_c.1.16.0.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/opt/homebrew/Cellar/geos/3.10.2/lib/libgeos_c.1.16.0.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
I've tried the answers to this question (missing libgeos_c.so on OSX), but none of them are working for me. I've also tried adding export DYLD_LIBRARY_PATH=/opt/homebrew/opt/geos/lib/
to my ~/.bash_profile.
The output of file /opt/homebrew/Cellar/geos/3.10.2/lib/libgeos.dylib
=
/opt/homebrew/Cellar/geos/3.10.2/lib/libgeos.dylib: Mach-O 64-bit dynamically linked shared library arm64
The output of file $(which python3)
=
/Users/danieljohnson/Documents/code/project/venv/bin/python3 (for architecture x86_64): Mach-O 64-bit executable x86_64
/Users/danieljohnson/Documents/code/project/venv/bin/python3 (for architecture arm64): Mach-O 64-bit executable arm64
I'm not sure where to go from here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我遇到的主要问题是由于我在VENV上安装了Mulitple Python版本/架构,而VENV正在选择不同的Pythons。我的解决方案是删除VENV,并用Just Python 3.8创建一个新的。
The main issue I was having was due to the fact that I had mulitple python versions/architectures installed on the venv and the venv was selecting different pythons. My solution was to delete the venv and create a new one with just python 3.8