alicevision / Meshroom

3D Reconstruction Software
http://alicevision.org
Other
11.14k stars 1.08k forks source link

unable to import shiboken2 when running self-compiled version [question] #901

Open TigerVersusT opened 4 years ago

TigerVersusT commented 4 years ago

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.

TigerVersusT commented 4 years ago

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

natowi commented 4 years ago

Did you run

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

?

TigerVersusT commented 4 years ago

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?

natowi commented 4 years ago

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

TigerVersusT commented 4 years ago

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

TigerVersusT commented 4 years ago

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.

TigerVersusT commented 4 years ago

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

TigerVersusT commented 4 years ago

@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\Administrator\source\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\Administrator\source\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 commented 4 years ago

Yes, this is a known issue https://github.com/alicevision/meshroom/issues/739

TigerVersusT commented 4 years ago

@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.

natowi commented 4 years ago

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