gpt4 book ai didi

python - 导入 PySide2 时出现 ImportError

转载 作者:行者123 更新时间:2023-12-05 04:55:35 30 4
gpt4 key购买 nike

我使用 pip install PySide2 安装了 PySide2

但是当我尝试导入它时出现了这个错误:

>>> import PySide2
PySide2/__init__.py: Unable to import shiboken2 from , C:\Users\ilia\AppData\Local\Programs\Python\Python38\Lib\idlelib, C:\Users\ilia\AppData\Local\Programs\Python\Python38\python38.zip, C:\Users\ilia\AppData\Local\Programs\Python\Python38\DLLs, C:\Users\ilia\AppData\Local\Programs\Python\Python38\lib, C:\Users\ilia\AppData\Local\Programs\Python\Python38, C:\Users\ilia\AppData\Roaming\Python\Python38\site-packages, C:\Users\ilia\AppData\Local\Programs\Python\Python38\lib\site-packages
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
import PySide2
File "C:\Users\ilia\AppData\Local\Programs\Python\Python38\lib\site-packages\PySide2\__init__.py", line 107, in <module>
_setupQtDirectories()
File "C:\Users\ilia\AppData\Local\Programs\Python\Python38\lib\site-packages\PySide2\__init__.py", line 58, in _setupQtDirectories
import shiboken2
File "C:\Users\ilia\AppData\Local\Programs\Python\Python38\lib\site-packages\shiboken2\__init__.py", line 27, in <module>
from .shiboken2 import *
ImportError: DLL load failed while importing shiboken2: The specified procedure could not be found.
OS = Windows 10
python = 3.8.0
Pyside2 = 5.15.2
shiboken2 = 5.15.2

最佳答案

查看 PyPI 文档 here .如果这没有帮助,请尝试使用

pip show pyside2

如果您正在使用它并且您使用的是正确版本的 pip(3),请确保它已安装在您的虚拟环境中。

Here是一个面临类似问题的人。

关于python - 导入 PySide2 时出现 ImportError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65378994/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com