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

后端 未结 2 1820
暗喜
暗喜 2021-01-17 17:13

I\'m running Django 1.8 and Python 3.4 on Ubuntu 14.04 LTS. Just recently, my Django app has been reporting that GEOS is not pres

相关标签:
2条回答
  • 2021-01-17 17:44

    You should do

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

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

    0 讨论(0)
  • 2021-01-17 17:45

    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.

    0 讨论(0)
提交回复
热议问题