McCode icon indicating copy to clipboard operation
McCode copied to clipboard

mcgui 3.4 windows issue

Open pkaracosta opened this issue 7 months ago • 8 comments

Hi, there is an issue with the GUI not running both from shortcut and the shell.

C:\Users\user>mcgui Traceback (most recent call last): File "C:\mcstas-3.4\lib\tools\Python\mcgui\mcgui.py", line 15, in from PyQt5 import QtCore, QtWidgets ImportError: DLL load failed while importing QtCore: The specified module could not be found.

Tried updating to latest python version and installing PyQt5 but no luck so far (windows). Thanks!

pkaracosta avatar Jan 23 '24 16:01 pkaracosta

Hi @pkaracosta

Sorry for not getting back to you before, have been busy running a McStas school. :)

If I remember correctly you may have an Anaconda Python installed “globally” on your Windows machine? (I.e. try starting a normal cmd.exe shell and write python --version to see if this is the case?)

If this is the case, very likely the “embedded” Python brought along with the installation of McStas 3.4 is likely colliding with that Python version - and the cure/workaround is potentially as simple as renaming your folder c:\mcstas-3.4\miniconda3 to something else, e.g. c:\mcstas-3.4\miniconda3gone

Try this and see what happens?

(We may have to install McStas dependencies to your "system" Python - the list is available here: https://github.com/McStasMcXtrace/McCode/blob/main/environment.yml)

Best,

Peter

willend avatar Jan 26 '24 12:01 willend

Thanks Peter, this solved it!! Best, Petroula

pkaracosta avatar Jan 26 '24 12:01 pkaracosta

Great! I will see what can be done to avoid this problem going forward with McStas 3.5.

willend avatar Jan 26 '24 12:01 willend