Jakar510
Posts: 3
Joined: Tue Jun 04, 2019 3:03 am

Python library not found: libpython3.7.so.1.0, libpython3.7m.so.1.0, libpython3.7mu.so.1.0

Tue Jun 04, 2019 3:08 am

Python library not found: libpython3.7.so.1.0, libpython3.7m.so.1.0, libpython3.7mu.so.1.0

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+.
pyinstaller Script.py
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 base_library.zip ...
23424 INFO: running Analysis Analysis-00.toc
23469 INFO: Caching module hooks...
23502 INFO: Analyzing /home/pi/Documents/TruePad.py
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 "hook-pkg_resources.py"...
67609 INFO: Processing pre-safe import module hook win32com
69377 INFO: Loading module hook "hook-_tkinter.py"...
69752 INFO: checking Tree
69779 INFO: checking Tree
69798 INFO: Loading module hook "hook-xml.etree.cElementTree.py"...
69801 INFO: Loading module hook "hook-pydoc.py"...
69803 INFO: Loading module hook "hook-distutils.py"...
69815 INFO: Loading module hook "hook-sysconfig.py"...
69882 INFO: Loading module hook "hook-PIL.Image.py"...
71944 INFO: Loading module hook "hook-numpy.core.py"...
72270 INFO: Loading module hook "hook-lib2to3.py"...
72284 INFO: Loading module hook "hook-encodings.py"...
72580 INFO: Loading module hook "hook-numpy.py"...
72582 INFO: Loading module hook "hook-xml.py"...
73034 INFO: Loading module hook "hook-setuptools.py"...
75957 INFO: Loading module hook "hook-PIL.py"...
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 "hook-PIL.SpiderImagePlugin.py"...
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 'pyi_rth__tkinter.py'
76941 INFO: Including run-time hook 'pyi_rth_multiprocessing.py'
76966 INFO: Including run-time hook 'pyi_rth_pkgres.py'
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>
sys.exit(run())
File "/usr/local/lib/python3.7/site-packages/PyInstaller/__main__.py", line 111, in run
run_build(pyi_config, spec_file, **vars(args))
File "/usr/local/lib/python3.7/site-packages/PyInstaller/__main__.py", 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/build_main.py", 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/build_main.py", line 784, in build
exec(text, spec_namespace)
File "<string>", line 17, in <module>
File "/usr/local/lib/python3.7/site-packages/PyInstaller/building/build_main.py", line 241, in __init__
self.__postinit__()
File "/usr/local/lib/python3.7/site-packages/PyInstaller/building/datastruct.py", line 158, in __postinit__
self.assemble()
File "/usr/local/lib/python3.7/site-packages/PyInstaller/building/build_main.py", line 573, in assemble
self._check_python_library(self.binaries)
File "/usr/local/lib/python3.7/site-packages/PyInstaller/building/build_main.py", line 676, in _check_python_library
raise IOError(msg)
OSError: Python library not found: libpython3.7.so.1.0, libpython3.7m.so.1.0, libpython3.7mu.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)

ghp
Posts: 1418
Joined: Wed Jun 12, 2013 12:41 pm
Location: Stuttgart Germany
Contact: Website

Re: Python library not found: libpython3.7.so.1.0, libpython3.7m.so.1.0, libpython3.7mu.so.1.0

Tue Jun 04, 2019 4:39 am

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.

Jakar510
Posts: 3
Joined: Tue Jun 04, 2019 3:03 am

Re: Python library not found: libpython3.7.so.1.0, libpython3.7m.so.1.0, libpython3.7mu.so.1.0

Tue Jun 04, 2019 3:00 pm

They're already installed.
pi@pi:~/Documents $ sudo apt-get update
Hit:1 http://archive.raspberrypi.org/debian stretch InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian 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.

Jakar510
Posts: 3
Joined: Tue Jun 04, 2019 3:03 am

Re: Python library not found: libpython3.7.so.1.0, libpython3.7m.so.1.0, libpython3.7mu.so.1.0

Tue Jun 04, 2019 3:07 pm

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 https://packages.debian.org/sid/libpython3.7-dev, 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]

User avatar
ben_nuttall
Raspberry Pi Foundation Employee & Forum Moderator
Raspberry Pi Foundation Employee & Forum Moderator
Posts: 231
Joined: Sun Aug 19, 2012 11:19 am
Location: Cambridge, UK
Contact: Website

Re: Python library not found: libpython3.7.so.1.0, libpython3.7m.so.1.0, libpython3.7mu.so.1.0

Sat Jun 08, 2019 2:01 pm

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.
Community Manager - Raspberry Pi Foundation
Author of GPIO Zero and creator of piwheels

Return to “Python”