visit: Visit Python module not getting any environment data
Describe the bug
I am attempting to learn how to run VisIt using Python to render some movies on my Windows 10 machine. I have been trying the simple tutorial to just get VisIt to launch using this code:
import sys
sys.path.append(r"D:\Programs\LLNL\VisIt 3.2.0\lib\site-packages")
import visit
visit.Launch()
This is supposed to open a window for VisIt I presume. Instead, I get a pop-up message of my VisIt env that looks like this:
In my Python interpreter I get this error after I click OK on the pop-up message:
ERROR: Could not find the visit python module (%s)
Tested paths:
D:\danie\OneDrive - West Chester University of PA\Work\visit_python_programs\site-packages\visit\visitmodule.pyd
D:\danie\OneDrive - West Chester University of PA\Work\visit_python_programs\visitmodule.pyd
It appears that the visit module is searching in the directory that my python file is located. If I create this same python file in the Visit 3.2.0\lib
directory it does manage to find the visit python module but I get a different error instead:
ERROR: DLL load failed while importing visit: The specified module could not be found.
Possible Fix?
Looking further into the issue, I have discovered that frontend.py
fails to update its empty res
dictionary with the VisIt env details. There appears to be an issue with the subprocess.Popen()
returning nothing, resulting in the res
variable not getting updated.
Desktop
- OS and version: Windows 10 - Version 10.0.19041 Build 19041
- VisIt Version: 3.2.0
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 17 (11 by maintainers)
VisIt 3.2.0 was compiled with Python 3.7.7. If you want to import VisIt into Python, you need that version. You can also run VisIt’s cli directly.