在M1 Mac上迁移的问题:GEO不兼容体系结构

发布于 2025-01-21 13:07:01 字数 1547 浏览 2 评论 0原文

我已经通过设置了,并且在迁移我的应用程序(在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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

卸妝后依然美 2025-01-28 13:07:01

我遇到的主要问题是由于我在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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文