-
Notifications
You must be signed in to change notification settings - Fork 49
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
ImportError: DLL load failed while importing qtgui_python #78
Comments
Thanks for the report. Evidently some library is failing to load, and we need to figure out what library that is and why. Can you do the following?:
That should print out a list of the DLLs that it imports and what it fails on. |
Thank you for the clear instructions! I followed the instructions and there was not a single item that failed. So I did some more digging, I added the commands to a python file and ran the script in VS Code and the following dlls failed: Failed \Device\HarddiskVolume3\Users\rwnst\radioconda\vcruntime140_1.dll The strange thing is that when I add those commands to the top of the python file generated by GNU Radio Companion and run it in VS Code, the two dll's in italic fail but the code works and I do not get any error. |
Curious. All of those libraries are installed where it says it's looking for them (at least for me, and the same should be true for you), and then there's the strange behavior on top of that where you're getting different results with different methods. Maybe there is some issue with import order at play. Instead of modifying the GRC-generated Python file to insert those exact lines at the top, you could modify it to put all of the existing includes inside the
If I had to guess based on a simple flowgraph I just generated, there's probably something funky happening when |
It is quite strange! So when I run the code you just posted I get the same error, but I found out that it is very dependant on the order of the imports. So when I run the original code generated by GRC I get the error, with the code written like this:
But when I swop the order of the imports, the error does not show, with the code like this:
So for some reason that solves my issue, but why it is an issue in the first place remains a mystery. |
Good to know that my hunch was correct! When you run the import trace on each of those lines individually, I think the output should provide the DLLs that get loaded in the order that they get loaded. If you do that for |
Great stuff! I did the trace individually, and then threw them into excel to see if there are differences in the order they are loaded as well as if they are loaded compared to one another. Unfortunately nothing stood out to me, and I also don't know enough to know what I am looking for. Here is the print out: Here is the first one (
And the next one (
|
Nothing is jumping out to me either. All of the libraries that get loaded in both instances are using the same path. All of the times it says "Failed" it appears to happen when a library is loaded for the second time, so I assume that means it doesn't load it a second time but it works overall because of course it only needs to be loaded once. The one exception is I'm afraid I'm out of ideas for the moment. I'm suspicious of OpenGL since gr-qtgui recently added a dependency there, but I don't know what to do next to investigate that. |
At least I know how to get it working for now, which is good enough for me. If something else changes or I discover something I will be back here. Thanks for all the support! If I should close this thread just let me know. |
I am having a very similar problem on a clean install of Windows 11 with no existing Python installation (but one previous non-radioconda version of gnuradio which is now removed). The first time I run the
Interesting If I run the unmodified test.py (as generated by GRC) in ipython, I get the DLL error. From that point on, it is not possible to run, even after modification and There is nothing strange looking in the environment variables. |
I have the same problem with a clean install on Windows 10 When I edit the generated python file by removing the first occurrance of "from PyQt5 import Qt" and run it manually in Conda Prompt it works. |
I did a clean install on a new pc and radioconda had no issue, but when I installed a package called openEMS I had the same issue but with openEMS. On my old PC I had installed openEMS first and then radioconda, which gave me this issue with radioconda and openEMS worked just fine. My solution currently for openEMS was to let python know exactly where the dll's are with this at the start of the file:
I did not get an opportunity to try this on my old PC with radioconda, but I hope you can use it to maybe get radioconda working. I am also unsure of how radioconda works with the dll's so it may not even be a suitable solution, but I thought it may help! |
I searched a bit and found that it starts working when I manually install Withou seting QT_PLUGIN_PATH I got another error: "qt.qpa.plugin: Could not load the Qt platform plugin "windows" in "" even though it was found." I don't understand exactly why it works... |
I still haven't been able to reproduce this or make any progress on figuring out what's going wrong. If anyone is able to get the |
I edited the generated python file as follows:
Output:
This is after I removed "C:\Program Files\Elmer 9.0-Release\bin" from PATH and it worked:
|
Interesting. I see that it tried to load We might be talking about multiple related issues in this report if people have different things installed that all provide alternative libraries. I don't know if there's a robust way to avoid these interactions when different software modifies and depends on the |
Does setting
|
It's weird because Conda adds its folders at the beginning of the PATH so I don't know why it uses the DLL from the Elmer folder
It doesn't help in my case. |
I'm encountering the same error. Trouble is I'm brand new to radioconda and I haven't used Unix in years, so a lot of the terminology is lost on me. I loaded Gnu Radio Companion onto my DLL load failed while importing qtgui_python: The specified procedure Listed below are the packages that didn't load properly: Failed \Device\HarddiskVolume3\Users I get the same error whether I load radioconda using the radioconda Running Gnu Radio Companion on a laptop, also running Windows 10, I I'd be grateful for any help |
I think I now understand what is happening here, at least for the case that I was just able to reproduce. See conda-forge/pyqt-feedstock#138 for a detailed description. But basically, if you have a directory on your As a temporary workaround, you can navigate to inside the radioconda installation directory and go to I plan to either have |
Fixed for at least one instance in 2024.05.29 release. Please re-open if you still see this same error after upgrading. |
Hello!
I have installed radioconda with the windows installer (3.10.8.0 (Python 3.11.6)), but when running the first tutorial in GNU radio companion I get the error below:
It seems to be a problem for all qt gui cards. I have tried the following:
All this has given me the same error and I am out of ideas. Any help is appreciated, thanks!
The text was updated successfully, but these errors were encountered: