centos7uwsgipython-3.9anaconda3

make error in conda env need libpython3.9.a but only have libpython3.9.so


I'm using centos7 and latest anaconda release with python3.9 to build a web server, but pip install uwsgi returned an error: "libpython3.9.a" not found. Only "libpython3.9.so" was provided by anaconda3.

Seems that there are some solutions for macos and debian, but nothing found for centos7, should I yum install something?


Solution

    1. use make to install python source code for a temp dir
    2. find lib/libpython3.9.a in your python install dir
    3. copy the lib/libpython3.9.a to your conda env path (eg: anaconda3/envs//lib/python3.9/config-3.9-x86_64-linux-gnu/),this path from install uwsgi error log(like, gcc: error: xxx/libpython3.9.a: No such file or directory)
    4. rerun pip install uwsgi and fix it