繁体   English   中英

如何修复 ModuleNotFoundError:没有名为“PySide2”的模块,

[英]How to fix ModuleNotFoundError: No module named 'PySide2',

我正在使用 docker 容器 ubuntu 18.04,我已经安装了 python 3.7。 该程序适用于带有 GUI 的 ubuntu 18.04。 我遇到以下错误: ModuleNotFoundError: No module named 'PySide2'

我尝试通过运行来安装它: pip install PySide2但这是我得到的错误:

Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement PySide2 (from versions: none)
ERROR: No matching distribution found for PySide2

我也试过: pip3 install PySide2但仍然得到同样的错误:

Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement PySide2 (from versions: none)
ERROR: No matching distribution found for PySide2

我最初使用的是 python 3.8。 但是在某处读到它不认为是这样。 所以我安装了 python 3.7。 我遇到了与 python 3.6 和 python 3.5 相同的错误

我还添加了--user ,即pip install PySide2 --userpip3 install PySide2 --user我仍然继续遇到同样的错误。

ERROR: Could not find a version that satisfies the requirement PySide2 (from versions: none)
ERROR: No matching distribution found for PySide2

我也累了sudo apt-get install PySide2然后我得到这个错误:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package PySide2

我什至厌倦了直接从https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyqt4安装轮子

然后运行它。 它不起作用。

如果有人可以帮助我,我真的很感激!

暂无
暂无

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

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