From emmanuel.farhi at synchrotron-soleil.fr Fri Feb 18 20:48:07 2022 From: emmanuel.farhi at synchrotron-soleil.fr (FARHI Emmanuel) Date: Fri, 18 Feb 2022 20:48:07 +0100 (CET) Subject: [mcstas-users] McStas and McXtrace ready-to-run web services Message-ID: <369467297.5076553.1645213687273.JavaMail.zimbra@synchrotron-soleil.fr> Hi all, we are happy to provide full simulation environments for free (at Binder) for the McStas/neutrons and McXtrace/xrays software. This information is available at [ http://mcxtrace.org/ | http://mcxtrace.org/ ] and [ http://mcstas.org/ | http://mcstas.org/ ] . * McStas : [ https://mybinder.org/v2/gh/McStasMcXtrace/mcstas-binder/master?urlpath=desktop | https://mybinder.org/v2/gh/McStasMcXtrace/mcstas-binder/master?urlpath=desktop ] * McXtrace : [ https://mybinder.org/v2/gh/McStasMcXtrace/mcxtrace-binder/master?urlpath=desktop | https://mybinder.org/v2/gh/McStasMcXtrace/mcxtrace-binder/master?urlpath=desktop ] Clicking on the links above starts a simulation environment (Xubuntu 20.04) in your browser, running at Binder with e.g. 8 cores, for free. The software can be started from the top-left Application>Education menu item. Happy simulation ! The McCode team. -- / ___| __/\_ | | | ____|_ _| | FARHI Emmanuel \___ \ \ | | | _| | || | Div Exp/Data Reduction and Analysis Team ___) /_ _ | |___| |___ | || |___ Tel : +33 (1) 69 35 96 04 |____/ \/ |_____|_____|___|_____| Saint-Aubin BP 48 - 91192 GIF/YVETTE CEDEX SYNCHROTRON http://www.synchrotron-soleil.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: From emmanuel.farhi at synchrotron-soleil.fr Thu Feb 24 09:45:10 2022 From: emmanuel.farhi at synchrotron-soleil.fr (Emmanuel FARHI) Date: Thu, 24 Feb 2022 09:45:10 +0100 Subject: [mcstas-users] =?utf-8?b?562U5aSNOiAgTWNTdGFzIGFuZCBNY1h0cmFjZSBy?= =?utf-8?q?eady-to-run_web_services?= In-Reply-To: <002501d82959$eaf9feb0$c0edfc10$@ihep.ac.cn> References: <369467297.5076553.1645213687273.JavaMail.zimbra@synchrotron-soleil.fr> <002501d82959$eaf9feb0$c0edfc10$@ihep.ac.cn> Message-ID: <1b139b1f-36ad-56d3-9844-efc13771a2d4@synchrotron-soleil.fr> Hi Wanju Luo, I can see two solutions: 1- start Binder with the JupyterLab interface through the link (for neutrons) and (for X-rays), then click on the Desktop icon/tile on the right panel. You can drag-n-drop files in the JupyterLab Tab (left panel showing the content of the Binder VNC session). 2- open Firefox and use any DropBox/NextCloud/etc cloud system, as well as a mere web-mail. Emmanuel. Le 24/02/2022 ? 09:38, luowj at ihep.ac.cn a ?crit?: > > Hi, how can I upload my own files on this server? > > Wanju Luo > > China Spallation Neutron Source > Dongguan Campus > > Institute of High Energy Physics, Chinese Academy of Sciences > Zhongziyuan road NO.1, Dongguan, Guangdong, PR China. 523803 > > *???:*mcstas-users-bounces at mcstas.org > *?? *FARHI Emmanuel > *????:*2022?2?19?3:48 > *???:*mcxtrace-users ; > mcstas-users > *??:*[mcstas-users] McStas and McXtrace ready-to-run web services > > Hi all, > > we are happy to provide full simulation environments for free (at > Binder) for the McStas/neutrons and McXtrace/xrays software. This > information is available at http://mcxtrace.org/ > and http://mcstas.org/ . > > * *McStas*: > https://mybinder.org/v2/gh/McStasMcXtrace/mcstas-binder/master?urlpath=desktop > > > * *McXtrace*: > https://mybinder.org/v2/gh/McStasMcXtrace/mcxtrace-binder/master?urlpath=desktop > > > Clicking on the links above starts a simulation environment (Xubuntu > 20.04) in your browser, running at Binder with e.g. 8 cores, for free. > The software can be started from the top-left Application>Education > menu item. > > Happy simulation ! > > The McCode team. > > -- > > / ___|__/\_| | ? | ____|_ _| |? ? ?FARHI Emmanuel > \___ \\ | | ? | ?_| ?| || |? ? ?Div Exp/Data Reduction and Analysis Team > ?___) /_ ?_| |___| |___ | || |___? Tel : +33 (1) 69 35 96 04 > |____/ ?\/|_____|_____|___|_____|?Saint-Aubin BP 48 - 91192 GIF/YVETTE > CEDEX > SYNCHROTRONhttp://www.synchrotron-soleil.fr > > -- signature / ___|__/\_| | ? | ____|_ _| | ? ? ?FARHI Emmanuel \___ \\ | | ? | ?_| ?| || | ? ? ?Div Exp/Data Reduction and Analysis Team ?___) /_ ?_| |___| |___ | || |___ ? Tel : +33 (1) 69 35 96 04 |____/ ?\/ |_____|_____|___|_____| ?Saint-Aubin BP 48 - 91192 GIF/YVETTE CEDEX SYNCHROTRON http://www.synchrotron-soleil.fr -------------- next part -------------- An HTML attachment was scrubbed... URL: From pkwi at fysik.dtu.dk Thu Feb 24 10:43:16 2022 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Thu, 24 Feb 2022 09:43:16 +0000 Subject: [mcstas-users] [mcxtrace-users] McStas and McXtrace ready-to-run web services In-Reply-To: <1b139b1f-36ad-56d3-9844-efc13771a2d4@synchrotron-soleil.fr> References: <369467297.5076553.1645213687273.JavaMail.zimbra@synchrotron-soleil.fr> <002501d82959$eaf9feb0$c0edfc10$@ihep.ac.cn> <1b139b1f-36ad-56d3-9844-efc13771a2d4@synchrotron-soleil.fr> Message-ID: <7F55BABE-47FC-444A-8273-74D311E3A1CD@fysik.dtu.dk> Hi all, Let me add that both of the McStas and McXtrace are also on dockerhub, meaning that you can easily run them on your own computer after installing Docker, using either: * docker run -p 8888:8888 docker.io/mccode/mcstas-2.7.1-3.1:1.0 * docker run -p 8888:8888 docker.io/mccode/mcxtrace-1.7-3.0:1.0 By adding -v $HOME/work:/home/jovyan/work in the above commands, you will mount a shared folder between ?work? on your physical machine and ?work? within the docker image. Best, Peter Peter Kj?r Willendrup Forskningsingeni?r, Specialkonsulent N?stformand for DTU Fysik LSU DTU Physics [cid:b6339554-7f28-441d-9f31-5944f811397c at win.dtu.dk] Technical University of Denmark [cid:e108e480-fcab-46e2-9531-b38165079572 at win.dtu.dk] Department of Physics Fysikvej Building 307 DK-2800 Kongens Lyngby Direct +45 2125 4612 Mobil +45 2125 4612 Fax +45 4593 2399 pkwi at fysik.dtu.dk On 24 Feb 2022, at 09.45, Emmanuel FARHI > wrote: Hi Wanju Luo, I can see two solutions: 1- start Binder with the JupyterLab interface through the link (for neutrons) and (for X-rays), then click on the Desktop icon/tile on the right panel. You can drag-n-drop files in the JupyterLab Tab (left panel showing the content of the Binder VNC session). 2- open Firefox and use any DropBox/NextCloud/etc cloud system, as well as a mere web-mail. Emmanuel. Le 24/02/2022 ? 09:38, luowj at ihep.ac.cn a ?crit : Hi, how can I upload my own files on this server? Wanju Luo China Spallation Neutron Source Dongguan Campus Institute of High Energy Physics, Chinese Academy of Sciences Zhongziyuan road NO.1, Dongguan, Guangdong, PR China. 523803 ???: mcstas-users-bounces at mcstas.org ?? FARHI Emmanuel ????: 2022?2?19? 3:48 ???: mcxtrace-users ; mcstas-users ??: [mcstas-users] McStas and McXtrace ready-to-run web services Hi all, we are happy to provide full simulation environments for free (at Binder) for the McStas/neutrons and McXtrace/xrays software. This information is available at http://mcxtrace.org/ and http://mcstas.org/. * McStas: https://mybinder.org/v2/gh/McStasMcXtrace/mcstas-binder/master?urlpath=desktop * McXtrace: https://mybinder.org/v2/gh/McStasMcXtrace/mcxtrace-binder/master?urlpath=desktop Clicking on the links above starts a simulation environment (Xubuntu 20.04) in your browser, running at Binder with e.g. 8 cores, for free. The software can be started from the top-left Application>Education menu item. Happy simulation ! The McCode team. -- / ___|__/\_| | | ____|_ _| | FARHI Emmanuel \___ \\ | | | _| | || | Div Exp/Data Reduction and Analysis Team ___) /_ _| |___| |___ | || |___ Tel : +33 (1) 69 35 96 04 |____/ \/ |_____|_____|___|_____| Saint-Aubin BP 48 - 91192 GIF/YVETTE CEDEX SYNCHROTRON http://www.synchrotron-soleil.fr -- / ___|__/\_| | | ____|_ _| | FARHI Emmanuel \___ \\ | | | _| | || | Div Exp/Data Reduction and Analysis Team ___) /_ _| |___| |___ | || |___ Tel : +33 (1) 69 35 96 04 |____/ \/ |_____|_____|___|_____| Saint-Aubin BP 48 - 91192 GIF/YVETTE CEDEX SYNCHROTRON http://www.synchrotron-soleil.fr _______________________________________________ mcxtrace-users mailing list mcxtrace-users at mcxtrace.org https://mailman2.mcxtrace.org/mailman/listinfo/mcxtrace-users -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 58 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.gif Type: image/gif Size: 1055 bytes Desc: image002.gif URL: From abdel.al-falou at tum.de Fri Mar 4 12:04:22 2022 From: abdel.al-falou at tum.de (abdel al-falou) Date: Fri, 4 Mar 2022 12:04:22 +0100 Subject: [mcstas-users] [McStas 2.7.1] JUMP-ITERATE problems Message-ID: Hello McStas team! my name is Abdel, I'm currently working with McStas 2.7.1 to simulate the SANS-1 beamline at FRM-II. I'd like to use the handy ITERATE tool in McStas to slice one beam guide into 54 parts, but I still have some difficulties with that. I have tried running the template from E. Farhi, , but it only sets/displays two guides instead of the intended 30. I'd be glad if you could help me figure it out, ideally via the template file. Thank you in advance, Abdel A. From pkwi at fysik.dtu.dk Sat Mar 5 07:52:29 2022 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Sat, 5 Mar 2022 06:52:29 +0000 Subject: [mcstas-users] [McStas 2.7.1] JUMP-ITERATE problems In-Reply-To: References: Message-ID: Hello Abdel, On 4 Mar 2022, at 12.04, abdel al-falou > wrote: my name is Abdel, I'm currently working with McStas 2.7.1 to simulate the SANS-1 beamline at FRM-II. I'd like to use the handy ITERATE tool in McStas to slice one beam guide into 54 parts, but I still have some difficulties with that. I have tried running the template from E. Farhi, , but it only sets/displays two guides instead of the intended 30. I'd be glad if you could help me figure it out, ideally via the template file. To be completely honest with you, JUMP + ITERATE is in fact a GOTO-mechanism - more or less a hack. :) (see also https://xkcd.com/292/) There is only one guide element in play, plus ?magic teleportation? of the neutron from end to start of that guide element. This does in fact ?work?, but will naturally display one guide element only. My recommendation will always be to avoid JUMP since its implications can be misleading and hard to debug. I suggest you in fact put all of the 54 guide elements in place, but make use of COPY to ease the copy-pasting. :) (In McStas 2.7.1 and earlier this means actual c-code-duplication and longer compile-time, but in 3.1 the compilation-time in such cases is much improved, due to the use of TRACE-functions.) Best, Peter Peter Kj?r Willendrup Forskningsingeni?r, Specialkonsulent N?stformand for DTU Fysik LSU DTU Physics [cid:b6339554-7f28-441d-9f31-5944f811397c at win.dtu.dk] Technical University of Denmark [cid:e108e480-fcab-46e2-9531-b38165079572 at win.dtu.dk] Department of Physics Fysikvej Building 307 DK-2800 Kongens Lyngby Direct +45 2125 4612 Mobil +45 2125 4612 Fax +45 4593 2399 pkwi at fysik.dtu.dk -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 58 bytes Desc: image001.gif URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.gif Type: image/gif Size: 1055 bytes Desc: image002.gif URL: From jean-francois.moulin at hereon.de Wed Mar 23 13:16:18 2022 From: jean-francois.moulin at hereon.de (Jean-Francois Moulin) Date: Wed, 23 Mar 2022 13:16:18 +0100 Subject: [mcstas-users] Fwd: Pyqt problem on fresh install In-Reply-To: <3cc042f9-03fe-6cec-acfc-4a0d1f5865a3@hereon.de> References: <3cc042f9-03fe-6cec-acfc-4a0d1f5865a3@hereon.de> Message-ID: <652fa8a7-c36e-8543-8028-570b86822e53@hereon.de> 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 ??? 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 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 ------------------------------------------------------------------------------ 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 From pkwi at fysik.dtu.dk Thu Mar 24 09:31:37 2022 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Thu, 24 Mar 2022 08:31:37 +0000 Subject: [mcstas-users] Pyqt problem on fresh install In-Reply-To: <652fa8a7-c36e-8543-8028-570b86822e53@hereon.de> References: <3cc042f9-03fe-6cec-acfc-4a0d1f5865a3@hereon.de> <652fa8a7-c36e-8543-8028-570b86822e53@hereon.de> Message-ID: <32DEE5B9-34FD-4BCE-91AF-64E3F42B2B6D@fysik.dtu.dk> 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 > 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 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 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 ------------------------------------------------------------------------------ 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 _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org https://mailman2.mcstas.org/mailman/listinfo/mcstas-users -------------- next part -------------- An HTML attachment was scrubbed... URL: From jean-francois.moulin at hereon.de Thu Mar 24 13:30:08 2022 From: jean-francois.moulin at hereon.de (Jean-Francois Moulin) Date: Thu, 24 Mar 2022 13:30:08 +0100 Subject: [mcstas-users] Pyqt problem on fresh install In-Reply-To: <32DEE5B9-34FD-4BCE-91AF-64E3F42B2B6D@fysik.dtu.dk> References: <3cc042f9-03fe-6cec-acfc-4a0d1f5865a3@hereon.de> <652fa8a7-c36e-8543-8028-570b86822e53@hereon.de> <32DEE5B9-34FD-4BCE-91AF-64E3F42B2B6D@fysik.dtu.dk> Message-ID: Dear Peter, thanks for your suggestions! Synaptic shows: ??? libqscintilla2-qt5-15 2.11.2+dfsg-6 My mint (20.3) is fresh, but not mint ;0) 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? I am now running mcstas 2.7.1 from ppa and actually cannot find execute mcrun as such: ??? jfmoulin at jfm17:~$ mcrun --write-user-config ??? Command 'mcrun' not found, did you mean: ? ??? command 'crun' from deb crun (0.12.1+dfsg-1) ? ??? command 'mcron' from deb mcron (1.0.8-1build1) ??? Try: sudo apt install mcrun.pl is actually found at usr/bin/mcrun.pl though. Link missing? Cheers, Jean-Fran?ois On 3/24/22 09:31, Peter Kj?r Willendrup wrote: > 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 >> 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 >> ??? 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 >> >> >> 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 >> >> >> ------------------------------------------------------------------------------ >> 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 >> _______________________________________________ >> mcstas-users mailing list >> mcstas-users at mcstas.org >> https://mailman2.mcstas.org/mailman/listinfo/mcstas-users > -- 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:jean-francois.moulin at hereon.de 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 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 ------------------------------------------------------------------------------ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From pkwi at fysik.dtu.dk Thu Mar 24 13:44:00 2022 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Thu, 24 Mar 2022 12:44:00 +0000 Subject: [mcstas-users] Pyqt problem on fresh install In-Reply-To: References: <3cc042f9-03fe-6cec-acfc-4a0d1f5865a3@hereon.de> <652fa8a7-c36e-8543-8028-570b86822e53@hereon.de> <32DEE5B9-34FD-4BCE-91AF-64E3F42B2B6D@fysik.dtu.dk> Message-ID: Hi again, I am quite sure your user environment could affect the Python environment that e.g. mcgui ?sees?. Your mcrun should in fact be sitting in the same directory where mcgui resides? But maybe you started it via a Desktop launcher? Running (e.g.) mcstas-3.1-environement should give you a shell which knows about the Python mcrun? Alternatively call mcrun with the full path, this should be something like /usr/share/mcstas/3.1/bin/mcrun mcrun.pl is ?so much last year? ;-) Best, Peter On 24 Mar 2022, at 13.30, Jean-Francois Moulin > wrote: Dear Peter, thanks for your suggestions! Synaptic shows: libqscintilla2-qt5-15 2.11.2+dfsg-6 My mint (20.3) is fresh, but not mint ;0) 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? I am now running mcstas 2.7.1 from ppa and actually cannot find execute mcrun as such: jfmoulin at jfm17:~$ mcrun --write-user-config Command 'mcrun' not found, did you mean: command 'crun' from deb crun (0.12.1+dfsg-1) command 'mcron' from deb mcron (1.0.8-1build1) Try: sudo apt install mcrun.pl is actually found at usr/bin/mcrun.pl though. Link missing? Cheers, Jean-Fran?ois On 3/24/22 09:31, Peter Kj?r Willendrup wrote: 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 > 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 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 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 ------------------------------------------------------------------------------ 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 > _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org https://mailman2.mcstas.org/mailman/listinfo/mcstas-users -- 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: jean-francois.moulin at hereon.de 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 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 ________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jean-francois.moulin at hereon.de Thu Mar 24 15:56:51 2022 From: jean-francois.moulin at hereon.de (Jean-Francois Moulin) Date: Thu, 24 Mar 2022 15:56:51 +0100 Subject: [mcstas-users] Pyqt problem on fresh install In-Reply-To: References: <3cc042f9-03fe-6cec-acfc-4a0d1f5865a3@hereon.de> <652fa8a7-c36e-8543-8028-570b86822e53@hereon.de> <32DEE5B9-34FD-4BCE-91AF-64E3F42B2B6D@fysik.dtu.dk> Message-ID: well, This is what I see with a print statement at the beginning of mcgui.py PyQt5.__file__ : /home/jfmoulin/.local/lib/python3.8/site-packages/PyQt5/__init__.py So, yes, this is my pip installed Qt Trying your sugestion: ??? jfmoulin at jfm17:~$ mcstas-2.7.1-environment ??? The new shell started here is now set up for running this version of mcstas: ??? McStas version 2.7.1 (Oct. 04, 2021) ??? Copyright (C) DTU Physics and Risoe National Laboratory, 1997-2021 ??? Additions (C) Institut Laue Langevin, 2003-2021 ??? All rights reserved ??? To end using this version of mcstas, exit this shell. ---- (in this same? shell) ??? jfmoulin at jfm17:~$ mcrun ??? Command 'mcrun' not found, did you mean: ? ??? command 'mcron' from deb mcron (1.0.8-1build1) ... so, still no joy. I tried here under 2.7.1 which is the one I installed after having the problem with 3.1 in the first place. 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.) Moreover, I seem to be stuck in the perl past for mcrun: ??? jfmoulin at jfm17:~$ which mcgui ??? /usr/share/mcstas/2.7.1/bin/mcgui -------------------------------------------------------------------------------- ??? jfmoulin at jfm17:~$ ls /usr/share/mcstas/2.7.1/bin/ ??? cif2hkl????????????? mcformat??? mcpl2ssw? mcstas postinst ??? mcdisplay-mantid.pl? mcgui?????? mcpltool? mcstas_errmsg pymcpltool ??? mcdoc.pl???????????? mcpl2phits? mcrun.pl? phits2mcpl ssw2mcpl On 3/24/22 13:44, Peter Kj?r Willendrup wrote: > Hi again, > > > I am quite sure your user environment could affect the Python > environment that e.g. mcgui ?sees?. > > Your mcrun should in fact be sitting in the same directory where mcgui > resides? But maybe you started it via a Desktop launcher? > > > Running (e.g.) > mcstas-3.1-environement > > should give you a shell which knows about the Python mcrun? > > Alternatively call mcrun with the full path, this should be something like > /usr/share/mcstas/3.1/bin/mcrun > > mcrun.pl is ?so much last year? ;-) > > > Best, > Peter > > >> On 24 Mar 2022, at 13.30, Jean-Francois Moulin >> wrote: >> >> Dear Peter, >> >> >> thanks for your suggestions! >> >> Synaptic shows: >> >> libqscintilla2-qt5-15 2.11.2+dfsg-6 >> >> My mint (20.3) is fresh, but not mint ;0) >> >> 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? >> >> >> I am now running mcstas 2.7.1 from ppa and actually cannot find >> execute mcrun as such: >> >> ??? jfmoulin at jfm17:~$ mcrun --write-user-config >> >> ??? Command 'mcrun' not found, did you mean: >> >> ? ??? command 'crun' from deb crun (0.12.1+dfsg-1) >> ? ??? command 'mcron' from deb mcron (1.0.8-1build1) >> >> ??? Try: sudo apt install >> >> >> mcrun.pl is actually found at usr/bin/mcrun.pl though. Link missing? >> >> >> Cheers, >> >> >> Jean-Fran?ois >> >> >> On 3/24/22 09:31, Peter Kj?r Willendrup wrote: >>> 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 >>>> 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 >>>> ??? 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 >>>> >>>> >>>> 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 >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> 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 >>>> _______________________________________________ >>>> mcstas-users mailing list >>>> mcstas-users at mcstas.org >>>> https://mailman2.mcstas.org/mailman/listinfo/mcstas-users >>> >> -- >> 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:jean-francois.moulin at hereon.de >> >> >> 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 >> >> 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 >> ------------------------------------------------------------------------ >> 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 >> > -- 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:jean-francois.moulin at hereon.de 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 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 ------------------------------------------------------------------------------ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jean-francois.moulin at hereon.de Thu Mar 24 16:01:17 2022 From: jean-francois.moulin at hereon.de (Jean-Francois Moulin) Date: Thu, 24 Mar 2022 16:01:17 +0100 Subject: [mcstas-users] Pyqt problem on fresh install In-Reply-To: References: <3cc042f9-03fe-6cec-acfc-4a0d1f5865a3@hereon.de> <652fa8a7-c36e-8543-8028-570b86822e53@hereon.de> <32DEE5B9-34FD-4BCE-91AF-64E3F42B2B6D@fysik.dtu.dk> Message-ID: <9a5f1aa7-90d5-9c2b-7a07-de1a5b535d76@hereon.de> I just installed Qscintilla form pip (as a user and I can now run mcgui). Will now start playing. Thanks for your help! On 3/24/22 13:44, Peter Kj?r Willendrup wrote: > Hi again, > > > I am quite sure your user environment could affect the Python > environment that e.g. mcgui ?sees?. > > Your mcrun should in fact be sitting in the same directory where mcgui > resides? But maybe you started it via a Desktop launcher? > > > Running (e.g.) > mcstas-3.1-environement > > should give you a shell which knows about the Python mcrun? > > Alternatively call mcrun with the full path, this should be something like > /usr/share/mcstas/3.1/bin/mcrun > > mcrun.pl is ?so much last year? ;-) > > > Best, > Peter > > >> On 24 Mar 2022, at 13.30, Jean-Francois Moulin >> wrote: >> >> Dear Peter, >> >> >> thanks for your suggestions! >> >> Synaptic shows: >> >> libqscintilla2-qt5-15 2.11.2+dfsg-6 >> >> My mint (20.3) is fresh, but not mint ;0) >> >> 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? >> >> >> I am now running mcstas 2.7.1 from ppa and actually cannot find >> execute mcrun as such: >> >> ??? jfmoulin at jfm17:~$ mcrun --write-user-config >> >> ??? Command 'mcrun' not found, did you mean: >> >> ? ??? command 'crun' from deb crun (0.12.1+dfsg-1) >> ? ??? command 'mcron' from deb mcron (1.0.8-1build1) >> >> ??? Try: sudo apt install >> >> >> mcrun.pl is actually found at usr/bin/mcrun.pl though. Link missing? >> >> >> Cheers, >> >> >> Jean-Fran?ois >> >> >> On 3/24/22 09:31, Peter Kj?r Willendrup wrote: >>> 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 >>>> 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 >>>> ??? 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 >>>> >>>> >>>> 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 >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> 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 >>>> _______________________________________________ >>>> mcstas-users mailing list >>>> mcstas-users at mcstas.org >>>> https://mailman2.mcstas.org/mailman/listinfo/mcstas-users >>> >> -- >> 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:jean-francois.moulin at hereon.de >> >> >> 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 >> >> 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 >> ------------------------------------------------------------------------ >> 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 >> > -- 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:jean-francois.moulin at hereon.de 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 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 ------------------------------------------------------------------------------ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From pkwi at fysik.dtu.dk Thu Mar 24 16:01:41 2022 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Thu, 24 Mar 2022 15:01:41 +0000 Subject: [mcstas-users] Pyqt problem on fresh install In-Reply-To: References: <3cc042f9-03fe-6cec-acfc-4a0d1f5865a3@hereon.de> <652fa8a7-c36e-8543-8028-570b86822e53@hereon.de> <32DEE5B9-34FD-4BCE-91AF-64E3F42B2B6D@fysik.dtu.dk> Message-ID: Hi, Hmm. Did you install the packages independently or using the ?python metapackage?, i.e. mcstas-suite-python (or mcstas-suite-python-ng in the case of 3.1) You may also try to directly install the python mcrun package apt-get install mcstas-tools-python-mcrun-2.7.1 Best, Peter On 24 Mar 2022, at 15.56, Jean-Francois Moulin > wrote: well, This is what I see with a print statement at the beginning of mcgui.py PyQt5.__file__ : /home/jfmoulin/.local/lib/python3.8/site-packages/PyQt5/__init__.py So, yes, this is my pip installed Qt Trying your sugestion: jfmoulin at jfm17:~$ mcstas-2.7.1-environment The new shell started here is now set up for running this version of mcstas: McStas version 2.7.1 (Oct. 04, 2021) Copyright (C) DTU Physics and Risoe National Laboratory, 1997-2021 Additions (C) Institut Laue Langevin, 2003-2021 All rights reserved To end using this version of mcstas, exit this shell. ---- (in this same shell) jfmoulin at jfm17:~$ mcrun Command 'mcrun' not found, did you mean: command 'mcron' from deb mcron (1.0.8-1build1) ... so, still no joy. I tried here under 2.7.1 which is the one I installed after having the problem with 3.1 in the first place. 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.) Moreover, I seem to be stuck in the perl past for mcrun: jfmoulin at jfm17:~$ which mcgui /usr/share/mcstas/2.7.1/bin/mcgui -------------------------------------------------------------------------------- jfmoulin at jfm17:~$ ls /usr/share/mcstas/2.7.1/bin/ cif2hkl mcformat mcpl2ssw mcstas postinst mcdisplay-mantid.pl mcgui mcpltool mcstas_errmsg pymcpltool mcdoc.pl mcpl2phits mcrun.pl phits2mcpl ssw2mcpl On 3/24/22 13:44, Peter Kj?r Willendrup wrote: Hi again, I am quite sure your user environment could affect the Python environment that e.g. mcgui ?sees?. Your mcrun should in fact be sitting in the same directory where mcgui resides? But maybe you started it via a Desktop launcher? Running (e.g.) mcstas-3.1-environement should give you a shell which knows about the Python mcrun? Alternatively call mcrun with the full path, this should be something like /usr/share/mcstas/3.1/bin/mcrun mcrun.pl is ?so much last year? ;-) Best, Peter On 24 Mar 2022, at 13.30, Jean-Francois Moulin > wrote: Dear Peter, thanks for your suggestions! Synaptic shows: libqscintilla2-qt5-15 2.11.2+dfsg-6 My mint (20.3) is fresh, but not mint ;0) 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? I am now running mcstas 2.7.1 from ppa and actually cannot find execute mcrun as such: jfmoulin at jfm17:~$ mcrun --write-user-config Command 'mcrun' not found, did you mean: command 'crun' from deb crun (0.12.1+dfsg-1) command 'mcron' from deb mcron (1.0.8-1build1) Try: sudo apt install mcrun.pl is actually found at usr/bin/mcrun.pl though. Link missing? Cheers, Jean-Fran?ois On 3/24/22 09:31, Peter Kj?r Willendrup wrote: 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 > 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 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 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 ------------------------------------------------------------------------------ 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 > _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org https://mailman2.mcstas.org/mailman/listinfo/mcstas-users -- 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: jean-francois.moulin at hereon.de 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 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 ________________________________ 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 -- 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: jean-francois.moulin at hereon.de 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 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 ________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From pkwi at fysik.dtu.dk Thu Mar 24 16:05:09 2022 From: pkwi at fysik.dtu.dk (=?utf-8?B?UGV0ZXIgS2rDpnIgV2lsbGVuZHJ1cA==?=) Date: Thu, 24 Mar 2022 15:05:09 +0000 Subject: [mcstas-users] Pyqt problem on fresh install In-Reply-To: References: <3cc042f9-03fe-6cec-acfc-4a0d1f5865a3@hereon.de> <652fa8a7-c36e-8543-8028-570b86822e53@hereon.de> <32DEE5B9-34FD-4BCE-91AF-64E3F42B2B6D@fysik.dtu.dk> Message-ID: <159C6E0B-6793-407B-B9A9-300DA5B342EF@fysik.dtu.dk> Hi, 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... 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. See the relevant sections in https://github.com/McStasMcXtrace/McCode/wiki in regard to conversion of instruments (and your own comps). Best Peter On 24 Mar 2022, at 16.01, Peter Kj?r Willendrup > wrote: Hi, Hmm. Did you install the packages independently or using the ?python metapackage?, i.e. mcstas-suite-python (or mcstas-suite-python-ng in the case of 3.1) You may also try to directly install the python mcrun package apt-get install mcstas-tools-python-mcrun-2.7.1 Best, Peter On 24 Mar 2022, at 15.56, Jean-Francois Moulin > wrote: well, This is what I see with a print statement at the beginning of mcgui.py PyQt5.__file__ : /home/jfmoulin/.local/lib/python3.8/site-packages/PyQt5/__init__.py So, yes, this is my pip installed Qt Trying your sugestion: jfmoulin at jfm17:~$ mcstas-2.7.1-environment The new shell started here is now set up for running this version of mcstas: McStas version 2.7.1 (Oct. 04, 2021) Copyright (C) DTU Physics and Risoe National Laboratory, 1997-2021 Additions (C) Institut Laue Langevin, 2003-2021 All rights reserved To end using this version of mcstas, exit this shell. ---- (in this same shell) jfmoulin at jfm17:~$ mcrun Command 'mcrun' not found, did you mean: command 'mcron' from deb mcron (1.0.8-1build1) ... so, still no joy. I tried here under 2.7.1 which is the one I installed after having the problem with 3.1 in the first place. 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.) Moreover, I seem to be stuck in the perl past for mcrun: jfmoulin at jfm17:~$ which mcgui /usr/share/mcstas/2.7.1/bin/mcgui -------------------------------------------------------------------------------- jfmoulin at jfm17:~$ ls /usr/share/mcstas/2.7.1/bin/ cif2hkl mcformat mcpl2ssw mcstas postinst mcdisplay-mantid.pl mcgui mcpltool mcstas_errmsg pymcpltool mcdoc.pl mcpl2phits mcrun.pl phits2mcpl ssw2mcpl On 3/24/22 13:44, Peter Kj?r Willendrup wrote: Hi again, I am quite sure your user environment could affect the Python environment that e.g. mcgui ?sees?. Your mcrun should in fact be sitting in the same directory where mcgui resides? But maybe you started it via a Desktop launcher? Running (e.g.) mcstas-3.1-environement should give you a shell which knows about the Python mcrun? Alternatively call mcrun with the full path, this should be something like /usr/share/mcstas/3.1/bin/mcrun mcrun.pl is ?so much last year? ;-) Best, Peter On 24 Mar 2022, at 13.30, Jean-Francois Moulin > wrote: Dear Peter, thanks for your suggestions! Synaptic shows: libqscintilla2-qt5-15 2.11.2+dfsg-6 My mint (20.3) is fresh, but not mint ;0) 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? I am now running mcstas 2.7.1 from ppa and actually cannot find execute mcrun as such: jfmoulin at jfm17:~$ mcrun --write-user-config Command 'mcrun' not found, did you mean: command 'crun' from deb crun (0.12.1+dfsg-1) command 'mcron' from deb mcron (1.0.8-1build1) Try: sudo apt install mcrun.pl is actually found at usr/bin/mcrun.pl though. Link missing? Cheers, Jean-Fran?ois On 3/24/22 09:31, Peter Kj?r Willendrup wrote: 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 > 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 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 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 ------------------------------------------------------------------------------ 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 > _______________________________________________ mcstas-users mailing list mcstas-users at mcstas.org https://mailman2.mcstas.org/mailman/listinfo/mcstas-users -- 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: jean-francois.moulin at hereon.de 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 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 ________________________________ 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 -- 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: jean-francois.moulin at hereon.de 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 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 ________________________________ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jean-francois.moulin at hereon.de Thu Mar 24 16:13:00 2022 From: jean-francois.moulin at hereon.de (Jean-Francois Moulin) Date: Thu, 24 Mar 2022 16:13:00 +0100 Subject: [mcstas-users] Pyqt problem on fresh install In-Reply-To: <159C6E0B-6793-407B-B9A9-300DA5B342EF@fysik.dtu.dk> References: <3cc042f9-03fe-6cec-acfc-4a0d1f5865a3@hereon.de> <652fa8a7-c36e-8543-8028-570b86822e53@hereon.de> <32DEE5B9-34FD-4BCE-91AF-64E3F42B2B6D@fysik.dtu.dk> <159C6E0B-6793-407B-B9A9-300DA5B342EF@fysik.dtu.dk> Message-ID: <55484613-1b67-6c1b-754f-18b3071a1b2d@hereon.de> Hi Thx, well yes the gui starts but mcrun seems to have rights issues. /bin/sh: 1: mcrun: Permission denied I will uninstall and retry with 3.1 (which I initially planned to use anyway) and report, but unfortunately not in the next hours. Cheers, JF On 3/24/22 16:05, Peter Kj?r Willendrup wrote: > Hi, > > > 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... > > 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. > > See the relevant sections in > https://github.com/McStasMcXtrace/McCode/wiki?in regard to conversion > of instruments (and your own comps). > > > Best > Peter > > > >> On 24 Mar 2022, at 16.01, Peter Kj?r Willendrup >> wrote: >> >> Hi, >> >> >> Hmm. Did you install the packages independently or using the ?python >> metapackage?, i.e. >> mcstas-suite-python (or mcstas-suite-python-ng in the case of 3.1) >> >> You may also try to directly install the python mcrun package >> >> apt-get install mcstas-tools-python-mcrun-2.7.1 >> >> >> Best, >> Peter >> >> >> >>> On 24 Mar 2022, at 15.56, Jean-Francois Moulin >>> wrote: >>> >>> well, >>> >>> This is what I see with a print statement at the beginning of mcgui.py >>> >>> PyQt5.__file__ : >>> /home/jfmoulin/.local/lib/python3.8/site-packages/PyQt5/__init__.py >>> >>> So, yes, this is my pip installed Qt >>> >>> Trying your sugestion: >>> >>> ??? jfmoulin at jfm17:~$ mcstas-2.7.1-environment ??? The new shell >>> started here is now set up for running this version of mcstas: ??? >>> McStas version 2.7.1 (Oct. 04, 2021) ??? Copyright (C) DTU Physics >>> and Risoe National Laboratory, 1997-2021 ??? Additions (C) Institut >>> Laue Langevin, 2003-2021 ??? All rights reserved ??? To end using >>> this version of mcstas, exit this shell. ---- (in this same? shell) >>> >>> ??? jfmoulin at jfm17:~$ mcrun ??? Command 'mcrun' not found, did you >>> mean: ? ??? command 'mcron' from deb mcron (1.0.8-1build1) ... >>> >>> so, still no joy. >>> >>> I tried here under 2.7.1 which is the one I installed after having >>> the problem with 3.1 in the first place. >>> >>> 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.) >>> >>> Moreover, I seem to be stuck in the perl past for mcrun: >>> >>> ??? jfmoulin at jfm17:~$ which mcgui ??? >>> /usr/share/mcstas/2.7.1/bin/mcgui ??? >>> -------------------------------------------------------------------------------- >>> >>> ??? jfmoulin at jfm17:~$ ls /usr/share/mcstas/2.7.1/bin/ ??? >>> cif2hkl????????????? mcformat??? mcpl2ssw? mcstas???????? postinst >>> ??? mcdisplay-mantid.pl? mcgui?????? mcpltool? mcstas_errmsg? >>> pymcpltool ??? mcdoc.pl???????????? mcpl2phits? mcrun.pl? >>> phits2mcpl???? ssw2mcpl >>> >>> On 3/24/22 13:44, Peter Kj?r Willendrup wrote: >>>> Hi again, >>>> >>>> >>>> I am quite sure your user environment could affect the Python >>>> environment that e.g. mcgui ?sees?. >>>> >>>> Your mcrun should in fact be sitting in the same directory where >>>> mcgui resides? But maybe you started it via a Desktop launcher? >>>> >>>> >>>> Running (e.g.) >>>> mcstas-3.1-environement >>>> >>>> should give you a shell which knows about the Python mcrun? >>>> >>>> Alternatively call mcrun with the full path, this should be >>>> something like >>>> /usr/share/mcstas/3.1/bin/mcrun >>>> >>>> mcrun.pl is ?so much last year? ;-) >>>> >>>> >>>> Best, >>>> Peter >>>> >>>> >>>>> On 24 Mar 2022, at 13.30, Jean-Francois Moulin >>>>> wrote: >>>>> >>>>> Dear Peter, >>>>> >>>>> thanks for your suggestions! >>>>> >>>>> Synaptic shows: >>>>> >>>>> ??? libqscintilla2-qt5-15 2.11.2+dfsg-6 >>>>> >>>>> My mint (20.3) is fresh, but not mint ;0) >>>>> >>>>> 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? >>>>> >>>>> I am now running mcstas 2.7.1 from ppa and actually cannot find >>>>> execute mcrun as such: >>>>> >>>>> ??? jfmoulin at jfm17:~$ mcrun --write-user-config ??? Command >>>>> 'mcrun' not found, did you mean: ? ??? command 'crun' from deb >>>>> crun (0.12.1+dfsg-1) ? ??? command 'mcron' from deb mcron >>>>> (1.0.8-1build1) ??? Try: sudo apt install >>>>> >>>>> mcrun.pl is actually found at usr/bin/mcrun.pl though. Link missing? >>>>> >>>>> Cheers, >>>>> >>>>> Jean-Fran?ois >>>>> >>>>> On 3/24/22 09:31, Peter Kj?r Willendrup wrote: >>>>>> 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 >>>>>>> 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 >>>>>>> ??? 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 >>>>>>> >>>>>>> >>>>>>> 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 >>>>>>> >>>>>>> >>>>>>> ------------------------------------------------------------------------------ >>>>>>> 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 >>>>>>> >>>>>>> _______________________________________________ >>>>>>> mcstas-users mailing list >>>>>>> mcstas-users at mcstas.org >>>>>>> https://mailman2.mcstas.org/mailman/listinfo/mcstas-users >>>>>> >>>>> -- >>>>> 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:jean-francois.moulin at hereon.de >>>>> >>>>> >>>>> 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 >>>>> >>>>> 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 >>>>> ------------------------------------------------------------------------ >>>>> 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 >>>>> >>>> >>> -- >>> 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:jean-francois.moulin at hereon.de >>> >>> >>> 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 >>> >>> 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 >>> ------------------------------------------------------------------------ >>> 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 >>> >> > -- 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:jean-francois.moulin at hereon.de 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 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 ------------------------------------------------------------------------------ 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: