Relocation R_X86_64_32S against '_Py_NotImplementedStruct' can not be used when making a shared object; recompile with -fPIC

后端 未结 3 1091
你的背包
你的背包 2021-01-17 11:23

I\'m trying to install the dlib Python library. On some systems (macOS, stock Ubuntu 14.04) pip install dlib works fine, but in the Ubuntu 14.x tha

3条回答
  •  我在风中等你
    2021-01-17 12:11

    The problem was that Python needs to be compiled with the --enable-shared flag for the dlib install to succeed. While in some cases the system Python is built with this flag (e.g. on Ubuntu), the one we were using in the CI environment was installed via pyenv which doesn't set it by default.

    The solution was to reinstall the pyenv-provided Python with the flag set like this:

    PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install --force 2.7.11

    To ensure this gets used: machine: python: version: 2.7.11 # Has to match the pyenv-installed version

提交回复
热议问题