<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi,
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Good that you found a solution / hack . :-) I do think you should also make sure you have e.g. the Python mcrun, I believe this is what mcgui will be configured to use...</div>
<div class=""><br class="">
</div>
<div class="">In regard to the tool layer, this is almost identical in 2.7.1 and 3.1. And 3.1 can be worth investing a little time in e.g. because of the (NVIDIA) GPU support.</div>
<div class=""><br class="">
</div>
<div class="">See the relevant sections in <a href="https://github.com/McStasMcXtrace/McCode/wiki" class="">https://github.com/McStasMcXtrace/McCode/wiki</a> in regard to conversion of instruments (and your own comps).</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Best</div>
<div class="">Peter</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 24 Mar 2022, at 16.01, Peter Kjær Willendrup <<a href="mailto:pkwi@fysik.dtu.dk" class="">pkwi@fysik.dtu.dk</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
Hi,
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Hmm. Did you install the packages independently or using the “python metapackage”, i.e.</div>
<div class="">mcstas-suite-python (or mcstas-suite-python-ng in the case of 3.1)</div>
<div class=""><br class="">
</div>
<div class="">You may also try to directly install the python mcrun package</div>
<div class=""><br class="">
</div>
<div class="">apt-get install mcstas-tools-python-mcrun-2.7.1</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class="">Peter</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On 24 Mar 2022, at 15.56, Jean-Francois Moulin <<a href="mailto:jean-francois.moulin@hereon.de" class="">jean-francois.moulin@hereon.de</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">
<p class="">well,</p>
<p class=""><br class="">
</p>
<p class="">This is what I see with a print statement at the beginning of mcgui.py<br class="">
</p>
<p class="">PyQt5.__file__ : /home/jfmoulin/.local/lib/python3.8/site-packages/PyQt5/__init__.py<br class="">
</p>
<p class="">So, yes, this is my pip installed Qt<br class="">
</p>
<p class="">  <br class="">
</p>
<p class="">Trying your sugestion:<br class="">
</p>
<p class="">    jfmoulin@jfm17:~$ mcstas-2.7.1-environment <br class="">
<br class="">
    The new shell started here is now set up for running this version of mcstas:<br class="">
<br class="">
    McStas version 2.7.1 (Oct. 04, 2021)<br class="">
    Copyright (C) DTU Physics and Risoe National Laboratory, 1997-2021<br class="">
    Additions (C) Institut Laue Langevin, 2003-2021<br class="">
    All rights reserved<br class="">
<br class="">
    To end using this version of mcstas, exit this shell.<br class="">
---- (in this same  shell)<br class="">
</p>
<p class="">    jfmoulin@jfm17:~$ mcrun<br class="">
<br class="">
    Command 'mcrun' not found, did you mean:<br class="">
<br class="">
      command 'mcron' from deb mcron (1.0.8-1build1)<br class="">
...</p>
<p class="">so, still no joy. <br class="">
</p>
<p class="">I tried here under 2.7.1 which is the one I installed after having the problem with 3.1 in the first place.</p>
<p class=""><br class="">
</p>
<p class="">And, BTW, what is a desktop launcher ;0) (i.e, I called mcrun from a shell as reported in my previous mail. No clicking, I swear.)<br class="">
</p>
<p class="">Moreover, I seem to be stuck in the perl past for mcrun:<br class="">
</p>
<p class=""><br class="">
</p>
<p class="">    jfmoulin@jfm17:~$ which mcgui<br class="">
    /usr/share/mcstas/2.7.1/bin/mcgui<br class="">
    --------------------------------------------------------------------------------</p>
<p class="">    jfmoulin@jfm17:~$ ls /usr/share/mcstas/2.7.1/bin/<br class="">
    cif2hkl              mcformat    mcpl2ssw  mcstas         postinst<br class="">
    mcdisplay-mantid.pl  mcgui       mcpltool  mcstas_errmsg  pymcpltool<br class="">
    mcdoc.pl             mcpl2phits  mcrun.pl  phits2mcpl     ssw2mcpl<br class="">
<br class="">
</p>
<div class="moz-cite-prefix">On 3/24/22 13:44, Peter Kjær Willendrup wrote:<br class="">
</div>
<blockquote type="cite" cite="mid:E1FE5974-F613-4045-95A8-29C8B1C75934@fysik.dtu.dk" class="">
Hi again,
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">I am quite sure your user environment could affect the Python environment that e.g. mcgui “sees”.</div>
<div class=""><br class="">
</div>
<div class="">Your mcrun should in fact be sitting in the same directory where mcgui resides? But maybe you started it via a Desktop launcher?</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Running (e.g.)</div>
<div class="">mcstas-3.1-environement  </div>
<div class=""><br class="">
<div class="">should give you a shell which knows about the Python mcrun?</div>
<div class=""><br class="">
</div>
<div class="">Alternatively call mcrun with the full path, this should be something like</div>
<div class="">/usr/share/mcstas/3.1/bin/mcrun </div>
<div class=""><br class="">
</div>
<div class="">mcrun.pl is “so much last year” ;-)</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class="">Peter</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On 24 Mar 2022, at 13.30, Jean-Francois Moulin <<a href="mailto:jean-francois.moulin@hereon.de" class="moz-txt-link-freetext" moz-do-not-send="true">jean-francois.moulin@hereon.de</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">
<p class="">Dear Peter,</p>
<p class=""><br class="">
</p>
<p class="">thanks for your suggestions!</p>
<p class="">Synaptic shows:<br class="">
</p>
<p class=""><span style="font-variant-ligatures:
                    no-common-ligatures" class="">    libqscintilla2-qt5-15
</span>2.11.2+dfsg-6</p>
<p class="">My mint (20.3) is fresh, but not mint ;0)</p>
<p class="">Regarding python, usually I pip install as a normal user. I am not quite sure what then gets precedence here... mcstas will call the system installed package, right ? Or does it inherit from the user calling mcgui?
<br class="">
</p>
<p class=""><br class="">
</p>
<p class="">I am now running mcstas 2.7.1 from ppa and actually cannot find execute mcrun as such:</p>
<p class="">    jfmoulin@jfm17:~$ mcrun --write-user-config<br class="">
<br class="">
    Command 'mcrun' not found, did you mean:<br class="">
<br class="">
      command 'crun' from deb crun (0.12.1+dfsg-1)<br class="">
      command 'mcron' from deb mcron (1.0.8-1build1)<br class="">
<br class="">
    Try: sudo apt install <deb name></p>
<p class=""><br class="">
</p>
<p class="">mcrun.pl is actually found at usr/bin/mcrun.pl though. Link missing?<br class="">
</p>
<p class=""><br class="">
</p>
<p class="">Cheers,</p>
<p class=""><br class="">
</p>
<p class="">Jean-François<br class="">
</p>
<p class=""><br class="">
</p>
<div class="moz-cite-prefix">On 3/24/22 09:31, Peter Kjær Willendrup wrote:<br class="">
</div>
<blockquote type="cite" cite="mid:32DEE5B9-34FD-4BCE-91AF-64E3F42B2B6D@fysik.dtu.dk" class="">
Dear Jean-Francois,
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">OK, thank you for the information.</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">Which exact Linux Mint are you on? As I remember Mint is a Debian-variant - and was our Debian packages your method of installation? In this situation, the dependencies are assumed to be resolved using Python modules provided by the OS itself,
 not conda or pip.</div>
<div class=""><br class="">
</div>
<div class="">The problem seems to relate to problems in the scintilla-based editor, which version of libqscintilla is installed?</div>
<div class=""><br class="">
</div>
<div class="">What I get on a Ubuntu 20.04 LTS (from the OS, not pip) is</div>
<div class="">
<div style="margin: 0px; font-stretch: normal;
                        font-size: 11px; line-height: normal;
                        font-family: Menlo;" class="">
<span style="font-variant-ligatures:
                          no-common-ligatures" class="">ii  libqscintilla2-qt5-15   2.11.2+dfsg-6 amd64        Qt5 port of the Scintilla source code editing widget</span></div>
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Is your Mint python “in mint condition” ( ;-) ) or has it been enriched with pip-stuff installed at the system level? In the latter case it may be worth checking how the code behaves in a “pure” environment.</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Now to a more practical attempt at a solution:</div>
<div class=""><br class="">
</div>
<div class="">I would try upgrading to 2.7.1 and/or 3.1 which have a new configuration-option in mccode_config.json that allows to avoid using scintilla all together:</div>
<div class=""><br class="">
</div>
<div class="">
<div style="margin: 0px; font-stretch: normal;
                        font-size: 11px; line-height: normal;
                        font-family: Menlo;" class="">
<span style="font-variant-ligatures:
                          no-common-ligatures" class="">mcstas-3.1 env ~ $ mcrun --write-user-config</span></div>
<div style="margin: 0px; font-stretch: normal;
                        font-size: 11px; line-height: normal;
                        font-family: Menlo;" class="">
<span style="font-variant-ligatures:
                          no-common-ligatures" class="">loading system configuration</span></div>
<div style="margin: 0px; font-stretch: normal;
                        font-size: 11px; line-height: normal;
                        font-family: Menlo;" class="">
<span style="font-variant-ligatures:
                          no-common-ligatures" class="">userconfig saved to /Users/pkwi/.mcstas/3.1/mccode_config.json</span></div>
</div>
<div class=""><br class="">
</div>
<div class="">and then edit mccode_config.json so that</div>
<div class=""><br class="">
</div>
<div class="">
<div style="margin: 0px; font-stretch: normal;
                        font-size: 11px; line-height: normal;
                        font-family: Menlo;" class="">
<span style="font-variant-ligatures:
                          no-common-ligatures" class="">    "QSCI": “0"</span></div>
</div>
<div class=""><br class="">
</div>
<div class="">This should avoid any reference to the qscintilla lib and widgets.</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Best and let me know how it goes,</div>
<div class=""><br class="">
</div>
<div class="">Peter</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On 23 Mar 2022, at 13.16, Jean-Francois Moulin <<a href="mailto:jean-francois.moulin@hereon.de" class="moz-txt-link-freetext" moz-do-not-send="true">jean-francois.moulin@hereon.de</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class=""><br class="">
<br class="">
Hello,<br class="">
<br class="">
<br class="">
I just tried a fresh install of mcstas on a linux mint box and could not start mcgui. The backtrace seems to point to a conflict with the installed pyqt5:<br class="">
<br class="">
<br class="">
Original exception was:<br class="">
Traceback (most recent call last):<br class="">
  File "/usr/share/mcstas/2.7.1/bin/../tools/Python/mcgui/mcgui.py", line 945, in <module><br class="">
    main()<br class="">
  File "/usr/share/mcstas/2.7.1/bin/../tools/Python/mcgui/mcgui.py", line 935, in main<br class="">
    mcguiApp.ctr = McGuiAppController()<br class="">
  File "/usr/share/mcstas/2.7.1/bin/../tools/Python/mcgui/mcgui.py", line 417, in __init__<br class="">
    self.view = McView()<br class="">
  File "/usr/share/mcstas/2.7.1/tools/Python/mcgui/viewclasses.py", line 23, in __init__<br class="">
    self.ew = McCodeEditorWindow()<br class="">
  File "/usr/share/mcstas/2.7.1/tools/Python/mcgui/viewclasses.py", line 281, in __init__<br class="">
    self.__initScintilla()<br class="">
  File "/usr/share/mcstas/2.7.1/tools/Python/mcgui/viewclasses.py", line 471, in __initScintilla<br class="">
    from PyQt5 import Qsci<br class="">
ValueError: PyCapsule_GetPointer called with incorrect name<br class="">
<br class="">
<br class="">
<br class="">
I tried both 2.7 and 3 versions, both show the same behaviour.<br class="">
<br class="">
<br class="">
For Info, pip3 list returns the following<br class="">
<br class="">
PyQt5                                5.15.6<br class="">
PyQt5-Qt5                         5.15.2<br class="">
PyQt5-sip                          12.9.1<br class="">
<br class="">
<br class="">
Any help appreciated!<br class="">
<br class="">
Jean-François<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
Bitte beachten Sie: Die Helmholtz-Zentrum Geesthacht - Zentrum für Material- und Küstenforschung GmbH hat sich am 31.03.2021 in Helmholtz-Zentrum hereon GmbH umbenannt. Informationen dazu finden Sie unter
<a href="http://www.hereon.de/name" class="" moz-do-not-send="true">www.hereon.de/name</a> <<a href="https://www.hereon.de/name" class="moz-txt-link-freetext" moz-do-not-send="true">https://www.hereon.de/name</a>><br class="">
<br class="">
Please note: Since the 31st of March 2021 the Helmholtz-Zentrum Geesthacht – Center for Materials and Coastal Research has a new name: Helmholtz-Zentrum hereon GmbH. More information
<a href="http://www.hereon.de/rebranding" class="" moz-do-not-send="true">www.hereon.de/rebranding</a> <<a href="https://www.hereon.de/rebranding" class="moz-txt-link-freetext" moz-do-not-send="true">https://www.hereon.de/rebranding</a>><br class="">
<br class="">
------------------------------------------------------------------------------<br class="">
Helmholtz-Zentrum hereon GmbH<br class="">
Max-Planck-Straße 1 I 21502 Geesthacht I Deutschland/Germany<br class="">
<br class="">
Geschäftsführung I Board of Management: Prof. Dr. Matthias Rehahn, Silke Simon<br class="">
Vorsitzender des Aufsichtsrates I Chairman of the Supervisory Board: Ministerialdirigent Engelbert Beyer<br class="">
Amtsgericht Lübeck HRB 285 GE (Register Court)<br class="">
Internet: <a href="http://www.hereon.de/" class="" moz-do-not-send="true">www.hereon.de</a> <<a href="https://www.hereon.de/" class="moz-txt-link-freetext" moz-do-not-send="true">https://www.hereon.de</a>><br class="">
_______________________________________________<br class="">
mcstas-users mailing list<br class="">
<a href="mailto:mcstas-users@mcstas.org" class="moz-txt-link-freetext" moz-do-not-send="true">mcstas-users@mcstas.org</a><br class="">
<a class="moz-txt-link-freetext" href="https://mailman2.mcstas.org/mailman/listinfo/mcstas-users" moz-do-not-send="true">https://mailman2.mcstas.org/mailman/listinfo/mcstas-users</a><br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</blockquote>
<pre class="moz-signature" cols="72">-- 
Dr. Jean-François Moulin
German Engineering Materials Science Centre (GEMS)
at Heinz Maier-Leibnitz Zentrum (MLZ)
Helmholtz-Zentrum Hereon
Lichtenbergstr. 1, 85747 Garching bei München, Germany
phone: +49-89-158860-762; email: <a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:jean-francois.moulin@hereon.de" moz-do-not-send="true">jean-francois.moulin@hereon.de</a></pre>
<br class="">
<br class="">
<div style=" font-family:poppins,
                  sans-serif;font-size:11px; width:540px; color:#333;" class="">
<span style="font-size:9px;" class="">Bitte beachten Sie: Die Helmholtz-Zentrum Geesthacht - Zentrum für Material- und Küstenforschung GmbH hat sich am 31.03.2021 in Helmholtz-Zentrum hereon GmbH umbenannt. Informationen dazu finden Sie unter
<a href="https://www.hereon.de/name" class="" moz-do-not-send="true">www.hereon.de/name</a>
<br class="">
<br class="">
<span style="font-size:9px;" class="">Please note: Since the 31st of March 2021 the Helmholtz-Zentrum Geesthacht – Center for Materials and Coastal Research has a new name: Helmholtz-Zentrum hereon GmbH. More information
<a href="https://www.hereon.de/rebranding" class="" moz-do-not-send="true">www.hereon.de/rebranding</a><br class="">
</span>
<div style=" font-family:poppins,
                      sans-serif;font-size:11px; width:540px;
                      color:#333;" class="">
<hr style="border:1px solid #00467d;" class="">
<span style="color:#00467d;" class="">Helmholtz-Zentrum hereon GmbH</span><br class="">
<span style="font-size:9px;" class="">Max-Planck-Straße 1 I 21502 Geesthacht I Deutschland/Germany<br class="">
<br class="">
Geschäftsführung I Board of Management: Prof. Dr. Matthias Rehahn, Silke Simon<br class="">
Vorsitzender des Aufsichtsrates I Chairman of the Supervisory Board: Ministerialdirigent Engelbert Beyer<br class="">
Amtsgericht Lübeck HRB 285 GE (Register Court)<br class="">
Internet: <a href="https://www.hereon.de/" class="" moz-do-not-send="true">www.hereon.de</a>
<br class="">
<br class="">
</span></div>
</span></div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</blockquote>
<pre class="moz-signature" cols="72">-- 
Dr. Jean-François Moulin
German Engineering Materials Science Centre (GEMS)
at Heinz Maier-Leibnitz Zentrum (MLZ)
Helmholtz-Zentrum Hereon
Lichtenbergstr. 1, 85747 Garching bei München, Germany
phone: +49-89-158860-762; email: <a class="moz-txt-link-abbreviated" href="mailto:jean-francois.moulin@hereon.de">jean-francois.moulin@hereon.de</a></pre>
<br class="">
<br class="">
<div style=" font-family:poppins, sans-serif;font-size:11px; width:540px; color:#333;" class="">
<span style="font-size:9px;" class="">Bitte beachten Sie: Die Helmholtz-Zentrum Geesthacht - Zentrum für Material- und Küstenforschung GmbH hat sich am 31.03.2021 in Helmholtz-Zentrum hereon GmbH umbenannt. Informationen dazu finden Sie unter
<a href="https://www.hereon.de/name" class="">www.hereon.de/name</a> <br class="">
<br class="">
<span style="font-size:9px;" class="">Please note: Since the 31st of March 2021 the Helmholtz-Zentrum Geesthacht – Center for Materials and Coastal Research has a new name: Helmholtz-Zentrum hereon GmbH. More information
<a href="https://www.hereon.de/rebranding" class="">www.hereon.de/rebranding</a><br class="">
</span>
<div style=" font-family:poppins, sans-serif;font-size:11px; width:540px; color:#333;" class="">
<hr style="border:1px solid #00467d;" class="">
<span style="color:#00467d;" class="">Helmholtz-Zentrum hereon GmbH</span><br class="">
<span style="font-size:9px;" class="">Max-Planck-Straße 1 I 21502 Geesthacht I Deutschland/Germany<br class="">
<br class="">
Geschäftsführung I Board of Management: Prof. Dr. Matthias Rehahn, Silke Simon<br class="">
Vorsitzender des Aufsichtsrates I Chairman of the Supervisory Board: Ministerialdirigent Engelbert Beyer<br class="">
Amtsgericht Lübeck HRB 285 GE (Register Court)<br class="">
Internet: <a href="https://www.hereon.de/" class="">www.hereon.de</a> <br class="">
<br class="">
</span></div>
</span></div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>