**
安装pyinstaller报错:Python library not in binary dependencies
**
运行环境
Centos7.0
Python3.6
pyinstaller安装
照着网上的一些教程安装了pyinstaller
pip3 installer pyinstaller
将pyinstaller的路径添加到环境变量
export PATH=$PATH:/usr/local/python3/lib/python3.6/site-packages
修改配置文件,将上一条命令写入 /etc/profile 文件
vi /etc/profile
然后装完之后开始使用,试着打包自己刚刚写的一个py文件
pyinstaller ex14.py
然后就开始报错
[root@VM_0_13_centos python_ex]# pyinstaller -F ex41.py
OSError: Python library not found: libpython3.6mu.so.1.0, libpython3.6.so.1.0, libpython3.6m.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)
解决办法
1打开 /etc/ld.so.conf 写入
/usr/local/lib64
/usr/local/lib
vi /etc/ld.so.conf
2
ldconfig
3
pyinstaller ex14.py
这样就解决问题了