DearPyGui
DearPyGui copied to clipboard
ImportError: DLL load failed while importing _dearpygui
Version of Dear PyGui
Version: 1.6.2 Operating System: Windows 7
My Issue/Question
Attempting to import the library fails while executing demo code. I have checked the FAQ and issues list (and found a https://github.com/hoffstadt/DearPyGui/issues/1357).
To Reproduce
Steps to reproduce the behavior:
import dearpygui.dearpygui as dpg
Attempted in Python 3.8.10 Attempted running the demo from IDLE and from Terminal. Attempted as a statement in the Python shell.
Expected behavior
The import statement executed with no errors.
Screenshots/Video
Standalone, minimal, complete and verifiable example
import dearpygui.dearpygui as dpg
def save_callback():
print("Save Clicked")
dpg.create_context()
dpg.create_viewport()
dpg.setup_dearpygui()
with dpg.window(label="Example Window"):
dpg.add_text("Hello world")
dpg.add_button(label="Save", callback=save_callback)
dpg.add_input_text(label="string")
dpg.add_slider_float(label="float")
dpg.show_viewport()
dpg.start_dearpygui()
dpg.destroy_context()
What is your dearpygui wheel version? It is important because the last time I had this problem, I was using dpg that was built by another python version.
I'm having the same issue; when trying to import DearPyGUI:
import dearpygui.dearpygui as dpg
I receive the error:
Traceback (most recent call last):
File "c:\Users\dbux\Documents\Repositories\Tests\dptest.py", line 1, in <module>
import dearpygui.dearpygui as dpg
File "C:\Users\dbux\Documents\Virtual environments\DearPyGUI_test\lib\site-packages\dearpygui\dearpygui.py", line 22, in <module>
import dearpygui._dearpygui as internal_dpg
ImportError: DLL load failed while importing _dearpygui: The specified module could not be found.
I am using VS Code as a dev environment, but having seen this comment I tried running the script from the command line and the issue persists there.
This occurs in a brand-new virtual environment with no other packages installed, and I have verified the dearpygui
folder and associated files are present in site-packages
.
- Windows 10 21H2, build 19044.1826, 64bit
- Python 3.9.13 [MSC v.1929 64 bit (AMD64)] on win32
- DearPyGUI 1.6.2
After running into a similar issue testing Plotly Dash, I found this StackOverflow question.
The resolution to that issue (download and install the latest Visual C++ redistributable) also immediately resolved the problem with DearPyGUI as well.
Closing this issue given the solution provided by dbux.