Sunday, February 20, 2022

[SOLVED] Installing PySide under Python 3 virtualenv on Ubuntu

Issue

I get the following error due to a missing library:

error: Failed to locate the Python library /usr/local/lib/libpython3.3m.so

I've tried installing pyside from the git HEAD as per this SO Pyside install fails (Python 2.7.4)

but still fails due to:

/usr/local/lib/libpython3.3m.a: could not read symbols: Bad value   

The file /usr/local/lib/libpython3.3m.a exists on my system. Any ideas?


Solution

This almost certainly happens because your Python installation has a static library under $PREFIX/lib, but no shared libraries. That is, there is a libpython3.3m.a file, but no libpython3.3m.so file(s).

To fix this, recompile Python with the --enable-shared flag.



Answered By - ekhumoro
Answer Checked By - Mildred Charles (WPSolving Admin)