Installing Pythia8

Asked by Shelley Tong

Hey there! I tried to install Pythia8 from Madgraph, but when I ran the command >install pythia8, the following message showed up:

   You are installing 'pythia8', please cite ref(s): arXiv:1410.3012.
Downloading the HEPToolInstaller at:
   http://madgraph.physics.illinois.edu/Downloads/HEPToolsInstaller/HEPToolsInstaller_V167.tar.gz
LHAPDF was not found. Do you want to install LHPADF6? (recommended) y/n >[y] [60s to answer]
>n
You decided not to link the Pythia8 installation to LHAPDF. Beware that only built-in PDF sets can be used then.
Now installing Pythia8. Be patient...
/Users/mac/MadLabFolder/MG5_aMC_v3_3_2/HEPTools/HEPToolsInstallers/HEPToolInstaller.py:510: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
  _mg5_version = LooseVersion(line[9:].strip())
/Users/mac/MadLabFolder/MG5_aMC_v3_3_2/HEPTools/HEPToolsInstallers/HEPToolInstaller.py:456: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
  if tool_name in ['lhapdf6', 'lhapdf'] and MG5_version and MG5_version < LooseVersion("2.6.1"):
/Users/mac/MadLabFolder/MG5_aMC_v3_3_2/HEPTools/HEPToolsInstallers/HEPToolInstaller.py:255: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
  ( lambda MG5version: MG5version < LooseVersion("2.6.1"),
Optional 'pythia8' dependency 'lhapdf6' is disabled and will not be available.
Fetching data with command:
  curl -OL https://pythia.org/download/pythia83/pythia8306.tgz
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
  0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (60) SSL certificate problem: certificate has expired
More details here: https://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
HTTPS-proxy has similar options --proxy-cacert and --proxy-insecure.
Could not download data at 'https://pythia.org/download/pythia83/pythia8306.tgz' because of:
stat: path should be string, bytes, os.PathLike or integer, not NoneType

Command "install pythia8" interrupted with error:
InvalidCmd : Installation of pythia8 failed.

What does " path should be string, bytes, os.PathLike or integer, not NoneType" mean?

Thanks!

Question information

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

Hi,

Your issue is a certificate issue.

> curl performs SSL certificate verification by default, using a "bundle"
> of Certificate Authority (CA) public keys (CA certs). If the default
> bundle file isn't adequate, you can specify an alternate file
> using the --cacert option.
> If this HTTPS server uses a certificate signed by a CA represented in
> the bundle, the certificate verification probably failed due to a
> problem with the certificate (it might be expired, or the name might
> not match the domain name in the URL).

I guess that the issue is that your curl version is not up-to-date and does not recognize the certificate used
by the pythia8 server. But I may be wrong.

Cheers,

Olivier

> On 21 Apr 2022, at 04:55, Shelley Tong <email address hidden> wrote:
>
> New question #701447 on MadGraph5_aMC@NLO:
> https://answers.launchpad.net/mg5amcnlo/+question/701447
>
> Hey there! I tried to install Pythia8 from Madgraph, but when I ran the command >install pythia8, the following message showed up:
>
> You are installing 'pythia8', please cite ref(s): arXiv:1410.3012.
> Downloading the HEPToolInstaller at:
> http://madgraph.physics.illinois.edu/Downloads/HEPToolsInstaller/HEPToolsInstaller_V167.tar.gz
> LHAPDF was not found. Do you want to install LHPADF6? (recommended) y/n >[y] [60s to answer]
>> n
> You decided not to link the Pythia8 installation to LHAPDF. Beware that only built-in PDF sets can be used then.
> Now installing Pythia8. Be patient...
> /Users/mac/MadLabFolder/MG5_aMC_v3_3_2/HEPTools/HEPToolsInstallers/HEPToolInstaller.py:510: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
> _mg5_version = LooseVersion(line[9:].strip())
> /Users/mac/MadLabFolder/MG5_aMC_v3_3_2/HEPTools/HEPToolsInstallers/HEPToolInstaller.py:456: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
> if tool_name in ['lhapdf6', 'lhapdf'] and MG5_version and MG5_version < LooseVersion("2.6.1"):
> /Users/mac/MadLabFolder/MG5_aMC_v3_3_2/HEPTools/HEPToolsInstallers/HEPToolInstaller.py:255: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
> ( lambda MG5version: MG5version < LooseVersion("2.6.1"),
> Optional 'pythia8' dependency 'lhapdf6' is disabled and will not be available.
> Fetching data with command:
> curl -OL https://pythia.org/download/pythia83/pythia8306.tgz
> % Total % Received % Xferd Average Speed Time Time Time Current
> Dload Upload Total Spent Left Speed
> 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
> curl: (60) SSL certificate problem: certificate has expired
> More details here: https://curl.haxx.se/docs/sslcerts.html
>
> curl performs SSL certificate verification by default, using a "bundle"
> of Certificate Authority (CA) public keys (CA certs). If the default
> bundle file isn't adequate, you can specify an alternate file
> using the --cacert option.
> If this HTTPS server uses a certificate signed by a CA represented in
> the bundle, the certificate verification probably failed due to a
> problem with the certificate (it might be expired, or the name might
> not match the domain name in the URL).
> If you'd like to turn off curl's verification of the certificate, use
> the -k (or --insecure) option.
> HTTPS-proxy has similar options --proxy-cacert and --proxy-insecure.
> Could not download data at 'https://pythia.org/download/pythia83/pythia8306.tgz' because of:
> stat: path should be string, bytes, os.PathLike or integer, not NoneType
>
> Command "install pythia8" interrupted with error:
> InvalidCmd : Installation of pythia8 failed.
>
> What does " path should be string, bytes, os.PathLike or integer, not NoneType" mean?
>
> Thanks!
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Revision history for this message
Matthew Low (matthewlow) said :
#2

Hi,

I'm also encountering this issue. My computer is unable to update curl, but I believe that calling "curl -k" will ignore the certification from the server. Is there a way to modify the Madgraph code to use "curl -k" (e.g. in a file in the madgraph/various/ directory)?

Thanks,
- Matt

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

you have to do in the directory above madgraph
bzr branch lp:~maddevelopers/mg5amcnlo/HEPToolsInstallers <https://code.launchpad.net/~maddevelopers/mg5amcnlo/HEPToolsInstallers>

then you can edit the file HEPToolsInstallers/HEPToolsInstallers.py
around line 1267
       if sys.platform == "darwin":
          program = ["curl","-OL"]
then you can go back to madgraph
and instead of doing
install pythia8
you can do
install pythia8 --local

then you should see the lines
"you are using a local installer. This is intended for debugging only!"
that state that you are indeed using the local version of the Heptoolsinstaller suite and not the version online.

Cheers,

Olivier

> On 17 Jun 2022, at 21:15, Matthew Low <email address hidden> wrote:
>
> Question #701447 on MadGraph5_aMC@NLO changed:
> https://answers.launchpad.net/mg5amcnlo/+question/701447
>
> Matthew Low requested more information:
> Hi,
>
> I'm also encountering this issue. My computer is unable to update
> curl, but I believe that calling "curl -k" will ignore the certification
> from the server. Is there a way to modify the Madgraph code to use
> "curl -k" (e.g. in a file in the madgraph/various/ directory)?
>
> Thanks,
> - Matt
>
> --
> You received this question notification because you are an answer
> contact for MadGraph5_aMC@NLO.

Can you help with this problem?

Provide an answer of your own, or ask Shelley Tong for more information if necessary.

To post a message you must log in.