![](/img/trans.png)
[英]ModuleNotFoundError: No module named 'PySide2' while trying to use poetry env
[英]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 --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
我也累了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.