Python3.3 can't find libpython3.3m.so in linux

2019-08-03 06:36发布

问题:

I'm using ubuntu 12.10 with default python3.2. However I downloaded python 3.3 as its much more polished. Of course, since then I have a nightmare with installing modules for 3.3, as python3 packages from synaptic install to 3.2 dir. So, I installed pip using python 3.3. Now I have pip-3.3 command, great. But, when I tried "sudo pip-3.3 install PySide" I quickly got an error: "error: Failed to locate the Python library /usr/lib/libpython3.3m.so". What's more, when I run "sudo pip install PySide" (command for 2.7), it builded and installed and runs flawlessy. Pyvenv and virtualenv both fail too. But I wan't to do it non-env way,just install pyside to global 3.3 lib dir.

So how can I install that PySide to python 3.3? I just can't get it to work... It looks like I will have to stick with default ubuntu python 3 version (this one runs great, everything works both from pip and synaptic), but I like to use newest python as it gets better and better with every release.

Btw, if that matters I also got following warning before that error: "package init file 'PySide/init.py' not found (or not a regular file)" and "package init file 'pysideuic/init.py' not found (or not a regular file)"

Edit: I installed full python3.3 from synaptic, including pythoh3.3-dev, debug, lib etc. Everything. And that dynamic python 3.3 lib exist in /usr/lib/x86_64-linux-gnu/libpython3.3m.so, maybe just python3.3 package for ubuntu is poor and installs it in wrong direction/doesn't do any symlinks tricks?

回答1:

Please try this answer installing from source (PySide). Download pyside sources and install from source, follow the instructions on the link.