<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>I just installed Qscintilla form pip (as a user and I can now run
      mcgui).</p>
    <p>Will now start playing.</p>
    <p>Thanks for your help!<br>
    </p>
    <div class="moz-cite-prefix">On 3/24/22 13:44, Peter Kjær Willendrup
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:E1FE5974-F613-4045-95A8-29C8B1C75934@fysik.dtu.dk">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      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>should give you a shell which knows about the Python mcrun?</div>
        <div><br class="">
        </div>
        <div>Alternatively call mcrun with the full path, this should be
          something like</div>
        <div>/usr/share/mcstas/3.1/bin/mcrun </div>
        <div><br class="">
        </div>
        <div>mcrun.pl is “so much last year” ;-)</div>
        <div><br class="">
        </div>
        <div><br class="">
        </div>
        <div>Best,</div>
        <div>Peter</div>
        <div><br class="">
        </div>
        <div><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>
<br>
<div style=" font-family:poppins, sans-serif;font-size:11px; width:540px; color:#333;">
<span style="font-size:9px;">
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">www.hereon.de/name</a> <br><br>
<span style="font-size:9px;">
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">www.hereon.de/rebranding</a><br>
</span>
<div style=" font-family:poppins, sans-serif;font-size:11px; width:540px; color:#333;">
<hr style="border:1px solid #00467d;">
<span style="color:#00467d;"> Helmholtz-Zentrum hereon GmbH</span><br>
<span style="font-size:9px;">
Max-Planck-Straße 1 I 21502 Geesthacht I Deutschland/Germany<br><br>
Geschäftsführung I Board of Management: Prof. Dr. Matthias Rehahn, Silke Simon<br>
Vorsitzender des Aufsichtsrates I Chairman of the Supervisory Board: Ministerialdirigent Engelbert Beyer<br>
Amtsgericht Lübeck HRB 285 GE (Register Court)<br>
Internet: <a href="https://www.hereon.de">www.hereon.de</a> <br><br>
</span></div>
 </span></div></body>
</html>