[Fixed] Windwos Qt 5.15 Shiboken failure

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
User avatar
apeltauer
Posts: 359
Joined: Fri Aug 11, 2017 2:19 pm

Re: Windwos Qt 5.15 Shiboken failure

Postby apeltauer » Sun Nov 15, 2020 4:17 pm

wmayer wrote:
Sat Nov 14, 2020 3:40 pm
Fixed with git commit 82beefa98d

Hint: If you don't want to copy the dlls from the libpack to the build directory you have to set the environment variable FREECAD_LIBPACK_BIN that points to the bin directory of the libpack.
Werne thanks a lot for the fix!!
Now the self tests are just working fine!
Capture.png
Capture.png (23.92 KiB) Viewed 335 times
User avatar
apeltauer
Posts: 359
Joined: Fri Aug 11, 2017 2:19 pm

Re: [Fixed] Windwos Qt 5.15 Shiboken failure

Postby apeltauer » Sun Nov 15, 2020 4:18 pm

wmayer wrote:
Sun Nov 15, 2020 10:23 am
Another broken thing of this libpack is the numpy package. Whenever trying to import it one gets such an error message:
The current Numpy installation ('C:\\Projects\\FreeCADLibs_12.x_x64_VC17_test\\bin\\lib\\site-packages\\numpy\\__init__.py') fails to pass a sanity check due to a bug in the windows runtime. See this issue for more information: https://tinyurl.com/y3dm3h86
Traceback (most recent call last):
File "<string>", line 42, in Initialize
File "C:\Projects\FreeCADLibs_12.x_x64_VC17_test\bin\Lib\site-packages\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
File "D:\Projects\FreeCAD_qt15\Mod\PartDesign\WizardShaft\WizardShaft.py", line 27, in <module>
from .Shaft import Shaft
File "C:\Projects\FreeCADLibs_12.x_x64_VC17_test\bin\Lib\site-packages\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
File "D:\Projects\FreeCAD_qt15\Mod\PartDesign\WizardShaft\Shaft.py", line 25, in <module>
from .SegmentFunction import SegmentFunction, IntervalFunction, StressFunction, TranslationFunction
File "C:\Projects\FreeCADLibs_12.x_x64_VC17_test\bin\Lib\site-packages\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
File "D:\Projects\FreeCAD_qt15\Mod\PartDesign\WizardShaft\SegmentFunction.py", line 25, in <module>
import numpy as np
File "C:\Projects\FreeCADLibs_12.x_x64_VC17_test\bin\Lib\site-packages\shiboken2\files.dir\shibokensupport\__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
File "C:\Projects\FreeCADLibs_12.x_x64_VC17_test\bin\lib\site-packages\numpy\__init__.py", line 305, in <module>
_win_os_check()
File "C:\Projects\FreeCADLibs_12.x_x64_VC17_test\bin\lib\site-packages\numpy\__init__.py", line 302, in _win_os_check
raise RuntimeError(msg.format(__file__)) from None
Hmmm....
Just updated numpy via pip...

Code: Select all

d:\Work\FC_Develop\FreeCadLibs\FreeCADLibs_12.x_x64_VC17_test\bin>python.exe -m pip install numpy
Requirement already satisfied: numpy in d:\work\fc_develop\freecadlibs\freecadlibs_12.x_x64_vc17_test\bin\lib\site-packages (1.19.4)
User avatar
sgrogan
Posts: 6205
Joined: Wed Oct 22, 2014 5:02 pm

Re: [Fixed] Windwos Qt 5.15 Shiboken failure

Postby sgrogan » Mon Nov 16, 2020 9:41 pm

apeltauer wrote:
Sun Nov 15, 2020 4:18 pm
Just updated numpy via pip...
https://stackoverflow.com/questions/646 ... r-numpy-an works for Py3.8 as well.
so uninstalling numpy 1.19.4 and

Code: Select all

pip install numpy==1.19.3
fixes it.
"fight the good fight"
User avatar
apeltauer
Posts: 359
Joined: Fri Aug 11, 2017 2:19 pm

Re: [Fixed] Windwos Qt 5.15 Shiboken failure

Postby apeltauer » Tue Nov 17, 2020 6:55 am

sgrogan wrote:
Mon Nov 16, 2020 9:41 pm
apeltauer wrote:
Sun Nov 15, 2020 4:18 pm
Just updated numpy via pip...
https://stackoverflow.com/questions/646 ... r-numpy-an works for Py3.8 as well.
so uninstalling numpy 1.19.4 and

Code: Select all

pip install numpy==1.19.3
fixes it.
updated the libpack....
https://github.com/apeltauer/FreeCAD/re ... ack_12.4.1
wmayer
Site Admin
Posts: 16852
Joined: Thu Feb 19, 2009 10:32 am

Re: [Fixed] Windwos Qt 5.15 Shiboken failure

Postby wmayer » Tue Nov 17, 2020 7:24 am

For those who don't want to re-download the full libpack can easily fix the numpy bug manually. As mentioned at the bottom of the SO article it suffices to comment out or remove the call of _win_os_check().
chennes
Posts: 224
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

Re: [Fixed] Windwos Qt 5.15 Shiboken failure

Postby chennes » Wed Nov 18, 2020 3:07 pm

apeltauer wrote:
Tue Nov 17, 2020 6:55 am
updated the libpack....
https://github.com/apeltauer/FreeCAD/re ... ack_12.4.1
I get an error if I enable the FREECAD_COPY_DEPEND_DIRS_TO_BUILD option:

Code: Select all

Copying libpack dependency directories to build directory for Windows MSVC build.

CMake Error at cMake/FreeCAD_Helpers/PrintFinalReport.cmake:226 (file):
  file COPY cannot find
  "E:/FreeCAD/FreeCADLibs_12.4.1_x64_VC17/FreeCADLibs_12.x_x64_VC17_test/bin/Lib/site-packages/PySide2/translations/qtwebengine_locales":
  No such file or directory.
Call Stack (most recent call first):
  CMakeLists.txt:87 (PrintFinalReport)


... end copying.
Chris Hennes
Pioneer Library System
User avatar
sgrogan
Posts: 6205
Joined: Wed Oct 22, 2014 5:02 pm

Re: [Fixed] Windwos Qt 5.15 Shiboken failure

Postby sgrogan » Wed Nov 18, 2020 10:17 pm

chennes wrote:
Wed Nov 18, 2020 3:07 pm
I get an error if I enable the FREECAD_COPY_DEPEND_DIRS_TO_BUILD option:
https://github.com/FreeCAD/FreeCAD/pull/4065
"fight the good fight"