Getting “django.core.exceptions.ImproperlyConfigured: GEOS is required and has not been detected.” although GEOS is installed

不打扰是莪最后的温柔 提交于 2019-12-01 15:36:15

I had the same problem today, though in an unrelated python project. This is is the line I also encountered and which led me here:

ImportError: /usr/lib/python3.4/lib-dynload/_ctypes.cpython-34m-x86_64-linux-gnu.so: undefined symbol: _PyTraceback_Add

It looks like Ubunut has pushed a Python 3.4 update which is not compatible with existing virtual environments. I'm able to fix the problem by recreating the virtualenv. Where this was impractical for the moment I simply replaced the virtualenv's python with the system one:

cd my-virtualenv
cp /usr/bin/python3.4 bin/python3.4

I can't say if this is a very sane thing to do, but it does seem to work in my case.

You should do

cp /usr/bin/python3 /path/to/my-virtualenv/bin/python3

instead, because that's the actual non-symlink file.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!