简体   繁体   English

找不到python模块

[英]Can't find python module

I using arch linux - monjaro我使用 arch linux - monjaro

Operating System: Manjaro Linux操作系统:Manjaro Linux
KDE Plasma Version: 5.22.3 KDE 等离子版本:5.22.3
KDE Frameworks Version: 5.84.0 KDE 框架版本:5.84.0
Qt Version: 5.15.2 Qt 版本:5.15.2
Kernel Version: 5.10.49-1-MANJARO (64-bit)内核版本:5.10.49-1-MANJARO(64 位)

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我找不到“Pyside2”模块,我在用户目录中搜索,在根目录中,我找到只有一个目录“站点包”的python2.7和没有lib目录的python3.9,然后当我打开站点包时我找到了其他模块但不是我的,是的,我从 pip 安装了它

pip install PySide2

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:将最新的 pip 发行版安装到您在第一步安装的 Python 中:下载get-pip.py并使用 Python 2.7 安装的 python 解释器使用命令提示符运行它:

$ 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:构建 PySide 发行版 下载 PySide 源发行版:

$ 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:您可以选择使用嵌入式 Qt 库构建独立版本的发行版:

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

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

Ok, if that doesn't work, try the snap store.好的,如果这不起作用,请尝试使用快照商店。

https://snapcraft.io/pyside2 https://snapcraft.io/pyside2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM