JeffersonLab / gluex_MCwrapper

1 stars 4 forks source link

python3 compatibility #119

Closed jrstevenjlab closed 1 month ago

jrstevenjlab commented 6 months ago

With the move to Alma9 OS, I've been unable to run gluex_MC.py with the standard build with the error

/usr/bin/env: ‘python2’: No such file or directory

Should the shebang be upgraded to python or python3 for Alma9? Well, if I try the shebang #!/usr/bin/env python on Alma9 I get a different error that looks like an RCDB error with python3(?):

Traceback (most recent call last):
  File "/home/gxproj7/work2/buildsAlma9/gluex_MCwrapper/gluex_MC.py", line 33, in <module>
    import mysql.connector
  File "/group/halld/Software/builds/Linux_Alma9-x86_64-gcc11.4.1/rcdb/rcdb_0.07.01/python/mysql/connector/__init__.py", line 28, in <module>
    from mysql.connector.connection import MySQLConnection
  File "/group/halld/Software/builds/Linux_Alma9-x86_64-gcc11.4.1/rcdb/rcdb_0.07.01/python/mysql/connector/connection.py", line 30, in <module>
    import StringIO
ModuleNotFoundError: No module named 'StringIO'

Is this something to be addressed in MCWrapper or should I post an RCDB issue https://github.com/JeffersonLab/rcdb/issues

T-Britton commented 6 months ago

This comes from a rough transition. There were several issues in other packages with py3. We can change the shebang but if python3 gluex_mc.py .... fails then it will solve nothing. I believe this would be an RCDB issue (there was and hddm_s issue but I am guessing that is now fixed)

jrstevenjlab commented 6 months ago

Understood, I made this an issue on RCDB https://github.com/JeffersonLab/rcdb/issues/103 where the latest tagged release is more than 2 years old(!). There may be more python3 issues in other packages, but if we're moving everything Alma9 we're being forced to finally solve them now...

jahernan1 commented 4 months ago

I have also run into this issue trying to run gluex_MC.py except I am getting an error with the ccdb when changing the shebang:

Traceback (most recent call last):
  File "/w/halld-scshelf2101/home/jahernan/HallD/MC/gen_amp/gluex_MCwrapper/gluex_MC.py", line 28, in <module>
    from ccdb.cmd.console_context import ConsoleContext
ModuleNotFoundError: No module named 'ccdb.cmd.console_context'

when I comment this line to check other issues I get the same message as Justin above.

Are there any updates on this issue?

aaust commented 1 month ago

This issue should be solved with the latest release v2.10.0