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

后端 未结 3 1061
你的背包
你的背包 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 11:58

    I had similar problem when building matplotlib (a dependency for scikit-image) for aws lambda python 3.6 inside amazon docker container amazon-linux-python-3.6.

    In short matplotlib was giving the same error as OP had for /usr/lib/libpython3.6m.a. Turned out there were two such libraries in the amazon docker container:

    find / -name "libpython3.6m.a"
    /usr/lib/libpython3.6m.a
    /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a
    

    So I just renamed /usr/lib/libpython3.6m.a to something else so that matplotlib does not use it, and chooses the second option:

    enter code heremv /usr/lib/libpython3.6m.a /usr/lib/libpython3.6m.a.moved

    After this change, scikit-image were successful using pip3 install --no-binary scikit-image scikit-image.

提交回复
热议问题