Page 1 of 1

Python library not found:,,

Posted: Tue Jun 04, 2019 3:08 am
by Jakar510
Python library not found:,,

Also tried ./configure --enable-shared and ./configure --enable-framework but both failed to compile when running make. Suggestions?
Running on a Raspberry Pi 3 B+.
243 INFO: PyInstaller: 3.4
244 INFO: Python: 3.7.3
247 INFO: Platform: Linux-4.19.42-v7+-armv7l-with-debian-9.9
250 INFO: wrote /home/pi/Documents/Script.spec
257 INFO: UPX is not available.
262 INFO: Extending PYTHONPATH with paths
['/home/pi/Documents', '/home/pi/Documents']
262 INFO: checking Analysis
263 INFO: Building Analysis because Analysis-00.toc is non existent
263 INFO: Initializing module dependency graph...
268 INFO: Initializing module graph hooks...
276 INFO: Analyzing ...
23424 INFO: running Analysis Analysis-00.toc
23469 INFO: Caching module hooks...
23502 INFO: Analyzing /home/pi/Documents/
30350 INFO: Processing pre-find module path hook distutils
41518 INFO: Processing pre-safe import module hook setuptools.extern.six.moves
43706 INFO: Processing pre-find module path hook site
43708 INFO: site: retargeting to fake-dir '/usr/local/lib/python3.7/site-packages/PyInstaller/fake-modules'
66544 INFO: Loading module hooks...
66546 INFO: Loading module hook ""...
67609 INFO: Processing pre-safe import module hook win32com
69377 INFO: Loading module hook ""...
69752 INFO: checking Tree
69779 INFO: checking Tree
69798 INFO: Loading module hook ""...
69801 INFO: Loading module hook ""...
69803 INFO: Loading module hook ""...
69815 INFO: Loading module hook ""...
69882 INFO: Loading module hook ""...
71944 INFO: Loading module hook ""...
72270 INFO: Loading module hook ""...
72284 INFO: Loading module hook ""...
72580 INFO: Loading module hook ""...
72582 INFO: Loading module hook ""...
73034 INFO: Loading module hook ""...
75957 INFO: Loading module hook ""...
75968 INFO: Excluding import 'PyQt4'
75981 INFO: Removing import of PyQt4 from module PIL.ImageQt
75988 INFO: Excluding import 'tkinter'
76003 INFO: Removing import of tkinter from module PIL.ImageTk
76009 INFO: Excluding import 'PyQt5'
76023 INFO: Removing import of PyQt5 from module PIL.ImageQt
76031 INFO: Excluding import 'PySide'
76046 INFO: Removing import of PySide from module PIL.ImageQt
76053 INFO: Import to be excluded not found: 'FixTk'
76059 INFO: Loading module hook ""...
76069 INFO: Excluding import 'tkinter'
76078 INFO: Import to be excluded not found: 'FixTk'
76276 INFO: Looking for ctypes DLLs
76877 INFO: Analyzing run-time hooks ...
76931 INFO: Including run-time hook ''
76941 INFO: Including run-time hook ''
76966 INFO: Including run-time hook ''
77076 INFO: Looking for dynamic libraries
80473 INFO: Looking for eggs
80474 INFO: Python library not in binary dependencies. Doing additional searching...
Traceback (most recent call last):
File "/usr/local/bin/pyinstaller", line 10, in <module>
File "/usr/local/lib/python3.7/site-packages/PyInstaller/", line 111, in run
run_build(pyi_config, spec_file, **vars(args))
File "/usr/local/lib/python3.7/site-packages/PyInstaller/", line 63, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "/usr/local/lib/python3.7/site-packages/PyInstaller/building/", line 838, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "/usr/local/lib/python3.7/site-packages/PyInstaller/building/", line 784, in build
exec(text, spec_namespace)
File "<string>", line 17, in <module>
File "/usr/local/lib/python3.7/site-packages/PyInstaller/building/", line 241, in __init__
File "/usr/local/lib/python3.7/site-packages/PyInstaller/building/", line 158, in __postinit__
File "/usr/local/lib/python3.7/site-packages/PyInstaller/building/", line 573, in assemble
File "/usr/local/lib/python3.7/site-packages/PyInstaller/building/", line 676, in _check_python_library
raise IOError(msg)
OSError: Python library not found:,,
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)

Re: Python library not found:,,

Posted: Tue Jun 04, 2019 4:39 am
by ghp
The last few lines of the error listing give a quite good hint:

* On Debian/Ubuntu, you would need to install Python development packages
* apt-get install python3-dev
* apt-get install python-dev

Just add a "sudo" before the apt-get in order to work properly.

Re: Python library not found:,,

Posted: Tue Jun 04, 2019 3:00 pm
by Jakar510
They're already installed.
pi@pi:~/Documents $ sudo apt-get update
Hit:1 stretch InRelease
Hit:2 stretch InRelease
Reading package lists... Done
pi@pi:~/Documents $ sudo apt-get install python-dev python3-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-dev is already the newest version (2.7.13-2).
python3-dev is already the newest version (3.5.3-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Re: Python library not found:,,

Posted: Tue Jun 04, 2019 3:07 pm
by Jakar510
it worked on x64 ubuntu 19.04 so it just means i'm missing the required packages some how but i can't find the names of the ones that i need for arm; doesn't appear to be available. If i go to the apt repository, there looks like there's a version for arm but apt-get isn't installing it.
admin@ubuntu:~$ apt list --installed | grep libpython3*

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libpython-dev/disco,now 2.7.16-1 amd64 [installed,automatic]
libpython-stdlib/disco,now 2.7.16-1 amd64 [installed,automatic]
libpython2-dev/disco,now 2.7.16-1 amd64 [installed,automatic]
libpython2-stdlib/disco,now 2.7.16-1 amd64 [installed,automatic]
libpython2.7-dev/disco,now 2.7.16-2 amd64 [installed,automatic]
libpython2.7-minimal/disco,now 2.7.16-2 amd64 [installed,automatic]
libpython2.7-stdlib/disco,now 2.7.16-2 amd64 [installed,automatic]
libpython2.7/disco,now 2.7.16-2 amd64 [installed,automatic]
libpython3-dbg/disco,now 3.7.3-1 amd64 [installed,automatic]
libpython3-dev/disco,now 3.7.3-1 amd64 [installed,automatic]
libpython3-stdlib/disco,now 3.7.3-1 amd64 [installed,automatic]
libpython3.7-dbg/disco,now 3.7.3-2 amd64 [installed,automatic]
libpython3.7-dev/disco,now 3.7.3-2 amd64 [installed,automatic]
libpython3.7-minimal/disco,now 3.7.3-2 amd64 [installed,automatic]
libpython3.7-stdlib/disco,now 3.7.3-2 amd64 [installed,automatic]
libpython3.7/disco,now 3.7.3-2 amd64 [installed,automatic]

Re: Python library not found:,,

Posted: Sat Jun 08, 2019 2:01 pm
by ben_nuttall
Looks like you've installed Python 3.7 on Raspbian Stretch.

You can't install an out-of-distribution Python version and expect system Python packages (like python3-dev) to work. They're compiled for Python 3.5 that's included in the distribution (Stretch).

I suggest you upgrade to Buster (unreleased/testing) to get system Python 3.7 and PyQt from the distribution.

To upgrade to Buster, edit /etc/apt/sources.list and replace stretch with buster on both lines, then run apt update and apt dist-upgrade.

It's due out fairly soon anyway.