先上报错情况
```powershell
OSError: Python library not found: libpython3.7m.so.1.0, libpython3.7mu.so.1.0, libpython3.7.so.1.0
This would mean your Python installation doesn't come with proper library files.
This usually happens by missing development package, or unsuitable build parameters of Python installation.
* On Debian/Ubuntu, you would need to install Python development packages
* apt-get install python3-dev
* apt-get install python-dev
* If you're building Python by yourself, please rebuild your Python with `--enable-shared` (or, `--enable-framework` on Darwin)
首先,centos下不需要python3-dev,因为压根没有,那个是Debian/Ubuntu下才有的,所以先不考虑,
然后看**OSError: Python library not found: libpython3.7m.so.1.0**找不到这个,这个是重点,一会要解决。再看这个提示--enable-shared,让我们安装的时候带上这个参数,因为安装python的时候,我没有加,所以,要重装Python,使用
`./configure --prefix=/usr/local/python3 --enable-shared`
然后`make && make install`就好了
现在再次打开python的时候,会报错,
~~ImportError: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory~~
需要使用
```powershell
echo "/usr/local/python3/lib/" >> /etc/ld.so.conf
ldconfig
```powershell
然后运行,ok,可以运行,打包也没问题了
新手发文,不太会排版,抱歉