ImportError while importing PySide2

Question:

I installed PySide2 using pip install PySide2

But i got this error when i tried to import it:

>>> import PySide2
PySide2/__init__.py: Unable to import shiboken2 from , C:UsersiliaAppDataLocalProgramsPythonPython38Libidlelib, C:UsersiliaAppDataLocalProgramsPythonPython38python38.zip, C:UsersiliaAppDataLocalProgramsPythonPython38DLLs, C:UsersiliaAppDataLocalProgramsPythonPython38lib, C:UsersiliaAppDataLocalProgramsPythonPython38, C:UsersiliaAppDataRoamingPythonPython38site-packages, C:UsersiliaAppDataLocalProgramsPythonPython38libsite-packages
Traceback (most recent call last):
  File "<pyshell#3>", line 1, in <module>
    import PySide2
  File "C:UsersiliaAppDataLocalProgramsPythonPython38libsite-packagesPySide2__init__.py", line 107, in <module>
    _setupQtDirectories()
  File "C:UsersiliaAppDataLocalProgramsPythonPython38libsite-packagesPySide2__init__.py", line 58, in _setupQtDirectories
    import shiboken2
  File "C:UsersiliaAppDataLocalProgramsPythonPython38libsite-packagesshiboken2__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
Asked By: ilia_rr

||

Answers:

Have a look at the PyPI documentation here.
If that doesn’t help try to use

pip show pyside2

Make sure it is installede in your virtual environtment if you are using that and you are using the correct version of pip(3).

Here is a person that is facing a similar problem.

Answered By: root
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.