[英]How to fix ModuleNotFoundError: No module named 'PySide2',
The am using docker container ubuntu 18.04, I have installed python 3.7.我正在使用 docker 容器 ubuntu 18.04,我已经安装了 python 3.7。 The program works on ubuntu 18.04 with GUI.该程序适用于带有 GUI 的 ubuntu 18.04。 I am facin the following error: ModuleNotFoundError: No module named 'PySide2'
我遇到以下错误: ModuleNotFoundError: No module named 'PySide2'
I have tried installing it by running: pip install PySide2
But this is the error I get:我尝试通过运行来安装它: 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
I have also tried: pip3 install PySide2
But still get the same error:我也试过: 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
I was initally using python 3.8.我最初使用的是 python 3.8。 But read somewhere that it does not suppose it.但是在某处读到它不认为是这样。 So I installed python 3.7.所以我安装了 python 3.7。 I have got the same error with python 3.6 and python 3.5我遇到了与 python 3.6 和 python 3.5 相同的错误
I have also adding --user
, that is, pip install PySide2 --user
and pip3 install PySide2 --user
I still continue to get the same error.我还添加了--user
,即pip install PySide2 --user
和pip3 install PySide2 --user
我仍然继续遇到同样的错误。
ERROR: Could not find a version that satisfies the requirement PySide2 (from versions: none)
ERROR: No matching distribution found for PySide2
I have also tired sudo apt-get install PySide2
Then I get this error:我也累了sudo apt-get install PySide2
然后我得到这个错误:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package PySide2
I even tired installing the wheel directly from https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyqt4我什至厌倦了直接从https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyqt4安装轮子
and then run it.然后运行它。 It doesn't work.它不起作用。
I would really apprecite if someone can help me out here!如果有人可以帮助我,我真的很感激!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.