Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DLL load failed while importing QtWebEngineWidgets #33

Open
Leinad1776 opened this issue Oct 19, 2023 · 6 comments
Open

DLL load failed while importing QtWebEngineWidgets #33

Leinad1776 opened this issue Oct 19, 2023 · 6 comments

Comments

@Leinad1776
Copy link

I can't get Calculix CAE working whatsoever. Might be blatantly clear to someone, but not to me.

I always get the following error message as shown:

[notice] A new release of pip is available: 23.1.2 -> 23.3
[notice] To update, run: C:\Users\drppo\Documents\cae_20230122_v0.9.1\bin\python\python.exe -m pip install --upgrade pip
STARTUP TESTS

INFO: Python version is 3.10.9.
INFO: CAE version is 0.9.1.
INFO: Default web browser is WindowsDefault.
INFO: PyQt5 OK
INFO: PyQtWebEngine OK
INFO: ccx2paraview OK
INFO: unv2ccx OK
INFO: numpy OK
INFO: vtk OK
Traceback (most recent call last):
File "C:\Users\drppo\Documents\cae_20230122_v0.9.1\src\cae.py", line 43, in
from PyQt5 import QtWidgets, QtWebEngineWidgets
ImportError: DLL load failed while importing QtWebEngineWidgets: The specified module could not be found.
Something went wrong.

Screenshot 2023-10-19 190813

Could you please shed some light on it?
Thanks

@imirzov
Copy link
Collaborator

imirzov commented Oct 20, 2023

Thank you for posting a bug. I've ran a command:

C:/cae/bin/python/python.exe -m pip list

and got

PyQt5             5.15.9
PyQt5-Qt5         5.15.2
PyQt5-sip         12.11.1
PyQtWebEngine     5.15.6
PyQtWebEngine-Qt5 5.15.2

CAE startup script tests if all packages from C:/cae/config/requirements_windows.txt were installed. But there are no packages PyQt5-Qt5, PyQt5-sip and PyQtWebEngine-Qt5 in the requirements (sorry, its my fault). Please, check if you have them installed on your CAE's Python. If not, run:

C:/cae/bin/python/python.exe -m pip install PyQt5-Qt5 PyQt5-sip PyQtWebEngine-Qt5

Of cause, change path C:/cae/bin/python/python.exe to yours one.

@Leinad1776
Copy link
Author

Hi imirzov,
thanks for the feedback.
I am still working on it. There were conflicts between Python versions when trying to install PyQt...and the other requirements.
After digging into the web I learned something. I executed the following command inside windows powershell in the bin folder of the cae_20230122_v0.9.1_windows, "pip install --target=C:\Users\drppo\Documents\cae_20230122_v0.9.1_windows\bin\python PyQt5-Qt5 PyQt5-sip PyQtWebEngine-Qt5 PyQtWebEngine".
This was the only way I could see the Qt5 folders and files being created in that folder.

When executing in powershell the command " -m pip install PyQt5-Qt5 PyQt5-sip PyQtWebEngine-Qt5 PyQtWebEngine" I was getting before, the following message: "Defaulting to user installation because normal site-packages is not writeable".

Some instances depending on the command I was trying I also got the "Requirement already satisfied" and this is, if I understood right, due to other Python versions installed on my Windows machine.

All that being said, now there are new problems, but related to a sip module.
Screenshot 2023-10-20 211345

Now when I run the command you gave, I get this as result, but the versions of the packages shown do no match those in the cae_...folder.
I can only guess that there might be a specifi command to check the version of these files in the folder I am, and not on the system, which is what I think is happening, hence the different versions.
Screenshot 2023-10-20 212438

Thank you again.

@imirzov
Copy link
Collaborator

imirzov commented Oct 21, 2023

When you run command pip list you get list of packages installed on your OS's Python. I don't care about Python installed on your OS. You have to use Python embedded into CAE. That's why I used absolute paths to python.exe in my previous post. And don't use pip install with target argument. Simply do what I've said in the previous post. Use Python from CAE/bin/python folder.

@Leinad1776
Copy link
Author

I am trying again the comand you instructed and see once more below the output I get.
Screenshot 2023-10-21 165635

I got your point about local Python and not OS Python. I just mentioned that because I wanted to explain thoroughly what I have done, what I run into and where I was in the end. You could perhaps realize I did something wrong and give me a new feedback.
Not sure if my previous post was clear, but the first thing I did was to run the command you gave and that returned no PyQt installation/creation whatever in the python folder inside cae. That is the reason why I kept looking for information on the web.

What am I doing wrong? I cant spot if there is something incorrect.

@imirzov
Copy link
Collaborator

imirzov commented Oct 22, 2023

Well, if requirements are satisfied, then I have no idea why the app does not start. Sorry.
PyQt seems to be fickle. I have an idea to rewrite everything with tkinter but have no free time at all.

@Leinad1776
Copy link
Author

I might be doing something wrong, unbekownst to myself.
I will learn something about managing Python within a machine and across different versions and will try again repeating the steps you suggested.
Thanks so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants