Pyhtia8 interface installation: "could not retrieve Pythia8 version"

Asked by Jaime Fernandez

When installing Pyhtia8 I get the following error for the installation of the interface:

/Users/jaimefernandeztejedor/Desktop/Collider_things/MG5_aMC_v2_9_19/HEPTools/MG5aMC_PY8_interface/compile.py:43: SyntaxWarning: invalid escape sequence '\s'
  mgamc_match = re.match('^MIN_MGAMC_VERSION\s*(?P<version>[\d\.]+)\s*$',line)
/Users/jaimefernandeztejedor/Desktop/Collider_things/MG5_aMC_v2_9_19/HEPTools/MG5aMC_PY8_interface/compile.py:44: SyntaxWarning: invalid escape sequence '\s'
  pythia8_match = re.match('^MIN_PYTHIA8_VERSION\s*(?P<version>[\d\.]+)\s*$',line)
/Users/jaimefernandeztejedor/Desktop/Collider_things/MG5_aMC_v2_9_19/HEPTools/MG5aMC_PY8_interface/compile.py:74: SyntaxWarning: invalid escape sequence '\d'
  if not re.match('^[\d|\.]+$',out):
/Users/jaimefernandeztejedor/Desktop/Collider_things/MG5_aMC_v2_9_19/HEPTools/MG5aMC_PY8_interface/compile.py:92: SyntaxWarning: invalid escape sequence '\s'
  mg5amc_version_finder = re.compile('^\s*version\s*\=\s*(?P<version>[\d\.]+)\s*$')
Error, could not retrieve Pythia8 version using script 'get_pythia8_version.py'. Check it.

I think similar issues where discussed in the past, but I have not been able to find a solution that works for me...

Thanks in advance.

Question information

Language:
English Edit question
Status:
Solved
For:
MadGraph5_aMC@NLO Edit question
Assignee:
No assignee Edit question
Solved by:
Jaime Fernandez
Solved:
Last query:
Last reply:
Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#1

Hi,

Looks like you are using python3.12, which is known to have various issue.
I guess that this is one issue to add to the list.
Can you try with a lower version of Python?

Anyway, I will check if I can do something for python3.12 (and if this is indeed the issue)

Revision history for this message
Jaime Fernandez (jfernandeztejedor) said :
#2

Looks like that was indeed the issue. No problem found when using python3.11. Thank you very much!

Revision history for this message
Olivier Mattelaer (olivier-mattelaer) said :
#3

In principle, the issue was related to the "new" python 3.12 syntax warning.
So I have fixed all the line that python3.12 is annoyed about and it should be fixed (but still have for all the CI to finish to make it work when a user run an "install" command)

Thanks,

Olivier

Revision history for this message
Jack Award (jackaward) said :
#4

The error message "could not retrieve Pythia8 version" typically indicates an issue with the installation or configuration of Pythia8 or its interface. Here are some steps you can take to troubleshoot and resolve the issue:

Check Pythia8 Installation: Ensure that Pythia8 is properly installed on your system. You may need to download and install Pythia8 from the official website or a package manager if you haven't already done so.
Verify Environment Variables: Check that the necessary environment variables related to Pythia8 are correctly set. These variables may include PYTHIA8, PYTHIA8DATA, and LD_LIBRARY_PATH. Make sure they point to the correct directories where Pythia8 and its data files are located.
Compile Pythia8 Interface: If you're using a specific interface (such as Pythia8 HepMC or Pythia8 ROOT), ensure that it is compiled and configured correctly. Follow the instructions provided with the interface to compile it against your Pythia8 installation.
Check Dependencies: Make sure that all dependencies required by Pythia8 and its interface are installed on your system. This includes libraries like HepMC, ROOT, and others that may be needed depending on your configuration.
Update or Reinstall: If you suspect that your Pythia8 installation or its interface may be corrupt or outdated, consider updating to the latest version or reinstalling it from scratch.
Consult Documentation: Refer to the documentation provided with Pythia8 and its interface for troubleshooting tips and installation instructions specific to your setup. You may find solutions to common issues or guidance on resolving installation problems.
Search Forums and Communities: Look for discussions or forums related to Pythia8 and its interface installation. Other users may have encountered similar issues and found solutions that could help you troubleshoot your problem.