Meshroom: unable to import shiboken2 when running self-compiled version [question]

Created on 19 May 2020  ·  11Comments  ·  Source: alicevision/meshroom

I packaged meshroom by running "python setup.py install", after everying is done, I ran the execute able but received this:

     "PySide2/__init__.py: Unable to import shiboken2 from D:\meroomCompiledVersion, D:\meroomCompiledVersion\lib\library.zip, D:\meroomCompiledVersion\lib"

I am quite sure I have installed the Pyside2 and shiboken2, because everying is fine when running meshroom from source, and libraries are all copied into the lib folder. Can anyone points out where am I wrong? Really need your help.

  • OS: win10
  • Python version 3.8
  • Qt/PySide version 5.14.2
  • Meshroom version: 2019.2.0 with some own features added
doc question

All 11 comments

I checked the dlls in lib\shiboken2 and found out that the dll type is unkown (should be win32 or x64), so did I installed the wrong version of shiboken2?

Dump of file shiboken2.abi3.dll
PE signature found
File Type: DLL
FILE HEADER VALUES
_8664 machine (Unknown)_
6 number of sections
5E81B55F time date stamp Mon Mar 30 17:01:19 2020
0 file pointer to symbol table
0 number of symbols
F0 size of optional header
2022 characteristics
Executable
Application can handle large (>2GB) addresses
DLL

Did you run

pip install -r requirements.txt -r dev_requirements.txt --timeout 45

?

Did you run

pip install -r requirements.txt -r dev_requirements.txt --timeout 45

?

Thanks for reply, I forget whether I have run it. But I have all the packages installed( higer version ), does it must match the lower version?

In the past I had issues with newer versions than specified in the requirements, especially for pyside.

That's a valueable information!I'll downgrade the pyside first and see whether it's work.

I'm too far from the pypi site, it should takes me some time to download those lower version packages, I'll tell you the result when it's ready, thanks for your help.

still solving the problem but at least find out the reason! It's a bug in PySide2 5.14.2 see this: https://github.com/anthony-tuininga/cx_Freeze/issues/638

@natowi your suggestion works well, but has new problems, if you have not met this, I will create a new issue under cx_Freeze, below is the error message:

C:\Users\Administratorsource\repos\meshroom\build\exe.win-amd64-3.8>Meshroom.exe
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\cx_Freeze\initscripts__startup__.py", line 40, in run
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\cx_Freeze\initscripts\Console.py", line 37, in run
File "meshroom/ui/__main__.py", line 10, in
File "C:\Users\Administratorsource\repos\meshroom\meshroom\ui\app.py", line 5, in
from PySide2.QtCore import Qt, QUrl, Slot, QJsonValue, Property, Signal, qInstallMessageHandler, QtMsgType, QSettings
ImportError: DLL load failed while importing QtCore: Can not find specific program。

@natowi Hi,natowi. Thanks for your help, I think I have solved the problem. May be we should update the install.md or readme.md to warn new developers that using python version greater than 3.6 is at risk of solving lots of enviroment related problems. I tackled all the problems by simply downgrading my python version to 3.68.

Yes, PySide2 and Python versions need to align. Combinations of some versions can cause the described problems.

"5.14 will not work on Windows with Python 3.8.0, please use Python 3.8.1 or greater."
https://wiki.qt.io/Qt_for_Python

https://github.com/alicevision/meshroom/issues/215

Was this page helpful?
0 / 5 - 0 ratings

Related issues

haesenbaerg picture haesenbaerg  ·  3Comments

raphael2692 picture raphael2692  ·  3Comments

ethansu1992 picture ethansu1992  ·  3Comments

Vekolb picture Vekolb  ·  5Comments

spono picture spono  ·  5Comments