Search code examples
pythonmoduledirectory

I can't find python module on monjaro linux


I using arch linux - monjaro

Operating System: Manjaro Linux
KDE Plasma Version: 5.22.3
KDE Frameworks Version: 5.84.0
Qt Version: 5.15.2
Kernel Version: 5.10.49-1-MANJARO (64-bit)

and I can't find "Pyside2" module, I searched in user dir, in root, I find just python2.7 with one dir "site-packages" and python3.9 without lib dir, then when I opened site-packages I found others modules but not my, and yes I installed it from pip

pip install PySide2

Solution

  • Install build dependencies:

    $ sudo apt-get install build-essential git cmake libqt4-dev libphonon-dev python2.7-dev libxml2-dev libxslt1-dev qtmobility-dev libqtwebkit-dev
    

    Install latest pip distribution into the Python you installed in the first step: download get-pip.py and run it using the python interpreter of your Python 2.7 installation using a command prompt:

    $ wget https://bootstrap.pypa.io/get-pip.py
    $ sudo python2.7 get-pip.py
    

    Install latest wheel distribution:

    $ sudo pip2.7 install wheel
    

    Building PySide distribution Download PySide source distribution:

    $ wget https://pypi.python.org/packages/source/P/PySide/PySide-1.2.4.tar.gz
    

    Extract the source distribution:

    $ tar -xvzf PySide-1.2.4.tar.gz
    

    Switch to the distribution directory:

    $ cd PySide-1.2.4
    

    Build the wheel binary distribution:

    $ python2.7 setup.py bdist_wheel --qmake=/usr/bin/qmake-qt4
    

    Optionally you can build standalone version of distribution with embedded Qt libs:

    $ python2.7 setup.py bdist_wheel --qmake=/usr/bin/qmake-qt4 --standalone
    

    https://pyside.readthedocs.io/en/latest/building/linux.html

    Ok, if that doesn't work, try the snap store.

    https://snapcraft.io/pyside2