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

mcgui 3.4 windows issue #1552

Open
pkaracosta opened this issue Jan 23, 2024 · 8 comments
Open

mcgui 3.4 windows issue #1552

pkaracosta opened this issue Jan 23, 2024 · 8 comments

Comments

@pkaracosta
Copy link

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!

@willend
Copy link
Contributor

willend commented Jan 26, 2024

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

@pkaracosta
Copy link
Author

Thanks Peter, this solved it!!
Best,
Petroula

@willend
Copy link
Contributor

willend commented Jan 26, 2024

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

@GustiLoesch
Copy link

Hey there,

I seem to have the exact same problem. I wanted to upgrade to McStas 3.4 from 3.3 and now i get the same error message when trying to start the gui from the shell. The thing is i get the same problem with version 2.7.2 that i downloaded just to check, but in version 3.3 the gui works fine.
I tried renaming the folder c:\mcstas-3.4\miniconda3 but that also didnt work.

Best
Augustin

@willend
Copy link
Contributor

willend commented Jun 12, 2024

@GustiLoesch quite certain there is a clash between "system" Python ( Anaconda? ) and the embedded one in your McStas.

I have three possible workarounds for you:

  1. Try replacing your miniconda3 folder with the content of the zip file found here: https://tmp.mcstas.org/Windows/
  2. Install WSL and use McStas through that - see https://github.com/McStasMcXtrace/McCode/blob/main/INSTALL-McStas-3.x/Windows/WSL/README.md
  3. If you can live without NCrystal and MCPL support you may also simply try installing (the experimental !!) McStas 3.x packages from conda-forge, follow the instructions at https://github.com/conda-forge/mcstas-suite-feedstock

Best of luck
Peter

@GustiLoesch
Copy link

Thank you :)
The first workaround fixed it.
Just out of curiosity, what is different to the miniconda folder that comes with the metapackage from the Installation via Github?

@willend
Copy link
Contributor

willend commented Jun 13, 2024

@GustiLoesch good to hear!

That installation was made on a machine where I was certain no other Python was present at install time. (I believe we are looking at a problem of detecting Qt "already available" on the surrounding system but linked to / matching another Python version...)

@willend
Copy link
Contributor

willend commented Jun 16, 2024

@GustiLoesch and @pkaracosta I have reworked the installation procedure, you may try it out via the outputs of this GitHub worker run:
https://github.com/McStasMcXtrace/McCode/actions/runs/9536639410

(Windows installer is included in the "ubuntu" artefact as it a cross-compile)

Screenshot 2024-06-16 at 17 02 31

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

No branches or pull requests

3 participants