[mcstas-users] Pyqt problem on fresh install

Peter Kjær Willendrup pkwi at fysik.dtu.dk
Thu Mar 24 09:31:37 CET 2022


Dear Jean-Francois,


OK, thank you for the information.

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.

The problem seems to relate to problems in the scintilla-based editor, which version of libqscintilla is installed?

What I get on a Ubuntu 20.04 LTS (from the OS, not pip) is
ii  libqscintilla2-qt5-15   2.11.2+dfsg-6 amd64        Qt5 port of the Scintilla source code editing widget


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.


Now to a more practical attempt at a solution:

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:

mcstas-3.1 env ~ $ mcrun --write-user-config
loading system configuration
userconfig saved to /Users/pkwi/.mcstas/3.1/mccode_config.json

and then edit mccode_config.json so that

    "QSCI": “0"

This should avoid any reference to the qscintilla lib and widgets.


Best and let me know how it goes,

Peter


On 23 Mar 2022, at 13.16, Jean-Francois Moulin <jean-francois.moulin at hereon.de<mailto:jean-francois.moulin at hereon.de>> wrote:



Hello,


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:


Original exception was:
Traceback (most recent call last):
  File "/usr/share/mcstas/2.7.1/bin/../tools/Python/mcgui/mcgui.py", line 945, in <module>
    main()
  File "/usr/share/mcstas/2.7.1/bin/../tools/Python/mcgui/mcgui.py", line 935, in main
    mcguiApp.ctr = McGuiAppController()
  File "/usr/share/mcstas/2.7.1/bin/../tools/Python/mcgui/mcgui.py", line 417, in __init__
    self.view = McView()
  File "/usr/share/mcstas/2.7.1/tools/Python/mcgui/viewclasses.py", line 23, in __init__
    self.ew = McCodeEditorWindow()
  File "/usr/share/mcstas/2.7.1/tools/Python/mcgui/viewclasses.py", line 281, in __init__
    self.__initScintilla()
  File "/usr/share/mcstas/2.7.1/tools/Python/mcgui/viewclasses.py", line 471, in __initScintilla
    from PyQt5 import Qsci
ValueError: PyCapsule_GetPointer called with incorrect name



I tried both 2.7 and 3 versions, both show the same behaviour.


For Info, pip3 list returns the following

PyQt5                                5.15.6
PyQt5-Qt5                         5.15.2
PyQt5-sip                          12.9.1


Any help appreciated!

Jean-François




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 www.hereon.de/name<http://www.hereon.de/name> <https://www.hereon.de/name>

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 www.hereon.de/rebranding<http://www.hereon.de/rebranding> <https://www.hereon.de/rebranding>

------------------------------------------------------------------------------
Helmholtz-Zentrum hereon GmbH
Max-Planck-Straße 1 I 21502 Geesthacht I Deutschland/Germany

Geschäftsführung I Board of Management: Prof. Dr. Matthias Rehahn, Silke Simon
Vorsitzender des Aufsichtsrates I Chairman of the Supervisory Board: Ministerialdirigent Engelbert Beyer
Amtsgericht Lübeck HRB 285 GE (Register Court)
Internet: www.hereon.de<http://www.hereon.de> <https://www.hereon.de>
_______________________________________________
mcstas-users mailing list
mcstas-users at mcstas.org<mailto:mcstas-users at mcstas.org>
https://mailman2.mcstas.org/mailman/listinfo/mcstas-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman2.mcstas.org/pipermail/mcstas-users/attachments/20220324/849a8341/attachment-0001.html>


More information about the mcstas-users mailing list