SOLVED: python3.dll, Qt5Windgets.dll, Qt5Gui.dll and Qt5Core.dll not found

Having trouble installing or compiling FreeCAD? Get help here.
User avatar
HarryvL
Posts: 1071
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

SOLVED: python3.dll, Qt5Windgets.dll, Qt5Gui.dll and Qt5Core.dll not found

Postby HarryvL » Sun Oct 20, 2019 6:40 pm

Hi I have switched to Windows (again) and am trying to compile the latest development version. I am using the following tools and resources:

Cmake 3.15.4
MVSC 2019 (16.3.5)
FreeCADLibs_12.1.2_x64_VC15

Neither Cmake nor MVSC cause any trouble, but when I execute FreeCAD.exe I get:

Code: Select all

The code execution cannot proceed because xxxx was not found
where xxxx = python3.dll, Qt5Windgets.dll, Qt5Gui.dll and Qt5Core.dll, respectively

I checked and the path FREECAD_LIBPACK_DIR is correct and the bin/libs directory of FreeCADLibs_12.1.2_x64_VC15 does contain a python3.lib file.

I am not sure how to proceed.
Last edited by HarryvL on Sun Feb 09, 2020 8:04 pm, edited 1 time in total.
wmayer
Site Admin
Posts: 15721
Joined: Thu Feb 19, 2009 10:32 am

Re: python3.dll, Qt5Windgets.dll, Qt5Gui.dll and Qt5Core.dll not found

Postby wmayer » Mon Oct 21, 2019 6:28 am

I am not sure how to proceed.
Either you copy all dlls from the libpack's bin directory to FreeCAD's bin directory or to save disk memory set the PATH environment variable to include the libpack's bin directory.
User avatar
HarryvL
Posts: 1071
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: python3.dll, Qt5Windgets.dll, Qt5Gui.dll and Qt5Core.dll not found

Postby HarryvL » Mon Oct 21, 2019 10:50 am

Thank you @wmayer. I will give it a try.
vocx
Posts: 3962
Joined: Thu Oct 18, 2018 9:18 pm

Re: python3.dll, Qt5Windgets.dll, Qt5Gui.dll and Qt5Core.dll not found

Postby vocx » Mon Oct 21, 2019 3:51 pm

HarryvL wrote:
Sun Oct 20, 2019 6:40 pm
Hi I have switched to Windows (again) and am trying to compile the latest development version. I am using the following tools and resources:
...
Did you read CompileOnWindows? It was recently re-written by a Windows user, so I suspect the information is up to date.
Always add the important information to your posts if you need help.
To support the documentation effort, and code development, your donation is appreciated: paypal.
User avatar
HarryvL
Posts: 1071
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: python3.dll, Qt5Windgets.dll, Qt5Gui.dll and Qt5Core.dll not found

Postby HarryvL » Mon Oct 21, 2019 6:34 pm

I did
User avatar
HarryvL
Posts: 1071
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: python3.dll, Qt5Windgets.dll, Qt5Gui.dll and Qt5Core.dll not found

Postby HarryvL » Tue Oct 22, 2019 5:38 am

wmayer wrote:
Mon Oct 21, 2019 6:28 am
I am not sure how to proceed.
Either you copy all dlls from the libpack's bin directory to FreeCAD's bin directory or to save disk memory set the PATH environment variable to include the libpack's bin directory.
This removed the error message. However, now FC (debug) aborts at start-up with a debug error ("abort() has been called"). But it runs ok from the command line. I will try the release version next.
wmayer
Site Admin
Posts: 15721
Joined: Thu Feb 19, 2009 10:32 am

Re: python3.dll, Qt5Windgets.dll, Qt5Gui.dll and Qt5Core.dll not found

Postby wmayer » Tue Oct 22, 2019 6:15 am

This removed the error message. However, now FC (debug) aborts at start-up with a debug error ("abort() has been called"). But it runs ok from the command line. I will try the release version next.
Qt must be able to find its qwindows.dll/qwindowsd.dll and if you use the Qt version of the libpack it usually fails because the built-in path names usually are different. So, for this case create the directory platforms inside FreeCAD's bin directory and copy the above dlls there.
User avatar
HarryvL
Posts: 1071
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: python3.dll, Qt5Windgets.dll, Qt5Gui.dll and Qt5Core.dll not found

Postby HarryvL » Tue Oct 22, 2019 6:30 am

Brilliant! That worked. Thanks Werner
User avatar
HarryvL
Posts: 1071
Joined: Sat Jan 06, 2018 7:38 pm
Location: Netherlands

Re: python3.dll, Qt5Windgets.dll, Qt5Gui.dll and Qt5Core.dll not found

Postby HarryvL » Tue Oct 22, 2019 6:33 am

Having said that, in FC I now get several PySide2 errors

Code: Select all

During initialization the error "No module named 'PySide2'" occurred in C:\Users\hvlan\Documents\FC_019\build\Mod\AddonManager\InitGui.py
Please look into the log file for further information
During initialization the error "No module named 'PySide2'" occurred in C:\Users\hvlan\Documents\FC_019\build\Mod\Arch\InitGui.py
Please look into the log file for further information
During initialization the error "No module named 'PySide2'" occurred in C:\Users\hvlan\Documents\FC_019\build\Mod\Draft\InitGui.py
Please look into the log file for further information
During initialization the error "invalid syntax (<string>, line 41)" occurred in C:\Users\hvlan\Documents\FC_019\build\Mod\OpenSCAD\InitGui.py
Please look into the log file for further information
During initialization the error "No module named 'PySide2'" occurred in C:\Users\hvlan\Documents\FC_019\build\Mod\Tux\InitGui.py
Please look into the log file for further information
CommandManager::addTo() try to add an unknown command (Std_AddonMgr) to a widget!
Traceback (most recent call last):
  File "<string>", line 2, in <module>
  File "C:\Users\hvlan\Documents\FC_019\build\Mod\Start\StartPage\StartPage.py", line 27, in <module>
    import six
<class 'ModuleNotFoundError'>: No module named 'six'
No module named 'six'
No module named 'PySide2'
Traceback (most recent call last):
  File "<string>", line 48, in Initialize
  File "C:\Users\hvlan\Documents\FC_019\build\Mod\Fem\femcommands\commands.py", line 26, in <module>
    from .manager import CommandManager
  File "C:\Users\hvlan\Documents\FC_019\build\Mod\Fem\femcommands\manager.py", line 32, in <module>
    import femtools.femutils as femutils
  File "C:\Users\hvlan\Documents\FC_019\build\Mod\Fem\femtools\femutils.py", line 45, in <module>
    from PySide import QtGui
  File "C:\Users\hvlan\Documents\FC_019\build\Ext\PySide\__init__.py", line 2, in <module>
    from PySide2 import __version__

wmayer
Site Admin
Posts: 15721
Joined: Thu Feb 19, 2009 10:32 am

Re: python3.dll, Qt5Windgets.dll, Qt5Gui.dll and Qt5Core.dll not found

Postby wmayer » Tue Oct 22, 2019 8:29 am

For my FreeCAD version I set the PATH variable:

Code: Select all

set PATH=C:\Projects\FreeCADLibs_12.1.3_x64_VC15\bin;C:\Tools\git\bin;%PATH%
When running FreeCAD and entering

Code: Select all

import six
six
I get
<module 'six' from 'C:\\Projects\\FreeCADLibs_12.1.3_x64_VC15\\bin\\lib\\site-packages\\six.py'>
and

Code: Select all

from PySide2 import QtGui
QtGui
gives
<module 'PySide2.QtGui' from 'C:\\Projects\\FreeCADLibs_12.1.3_x64_VC15\\bin\\lib\\site-packages\\PySide2\\QtGui.cp36-win_amd64.pyd'>
For the debug version the output is similar. The only difference is that QtGui shows
<module 'PySide2.QtGui' from 'C:\\Projects\\FreeCADLibs_12.1.3_x64_VC15\\bin\\lib\\site-packages\\PySide2\\QtGui_d.cp36-win_amd64.pyd'>