Skip to main content

PYTHIA

PYTHIA is a program for the generation of high-energy physics collision events, i.e. for the description of collisions at high energies between electrons, protons, photons and heavy nuclei. It contains theory and models for a number of physics aspects, including hard and soft interactions, parton distributions, initial- and final-state parton showers, multiparton interactions, fragmentation and decay. It is largely based on original research, but also borrows many formulae and other knowledge from the literature. As such it is categorized as a general purpose Monte Carlo event generator.

Installation

The PYTHIA package is natively written in C++, which is the preferred interface. To work with PYTHIA via C++ go to the PYTHIA homepage and follow the instructions outlined there. The Python interface to PYTHIA can be installed directly via pip. Note that for this PyPI distribution of PYTHIA, the module name has been changed from pythia8 to pythia8mc as the pythia8 project name was unavailable. Outside of the PyPI distribution, the pythia8 module name is always used.

pip install pythia8mc

The interface is also available via conda.

conda install -c conda-forge pythia8

It is possible, and in many ways preferable, to build the Python interface directly from the PYTHIA C++ distribution (as well as update the Python bindings) using the configuration script.

wget https://pythia.org/download/pythia83/pythia8XXX.tgz
tar xvfz pythia8XXX.tgz
cd pythia8XXX
./configure --with-python
make

Usage

For a full description of usage, as well as examples, see the accompanying HTML manual for this version of PYTHIA.

The following imports the pythia8mc module and creates a Pythia instance.

import pythia8mc
pythia = pythia8mc.Pythia()

PYTHIA must then be configured and initialized, in this example to produce minimum bias events at the LHC.

pythia.readString("SoftQCD:all = on")
pythia.init()

Finally, we can produce an event, and explore the event record.

pythia.next()
for prt in pythia.event: print(prt.name())

Paths

PYTHIA requires the XML files which are used to build the HTML manual to define settings. Additionally, settings files for tunes are also distributed with PYTHIA. For the PyPI distribution, these files can be found along the relative path,

../../../share/Pythia8/xmldoc

with respect to the pythia8mc module library. By default, this path should be correctly set, but it can be printed as follows.

print(pythia8mc.__file__.rstrip("pythia8mc.so") + "../../../share/Pythia8/xmldoc")

The settings directory can be found in ../settings/ with respect to this folder. However, it is possible to overwrite the XML path by setting the environment variable PYTHIA8DATA,

export PYTHIA8DATA=<PYTHIA XML path> 

or by passing the XML path to the Pythia constructor.

pythia8mc.Pythia("<PYTHIA XML path>")

Metadata

Release files for pythia8mc 8.318.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pythia8mc 8.318.0
File Size Uploaded
pythia8mc-8.318.0.tar.gz 22.2 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for pythia8mc 8.318.0
File
pythia8mc-8.318.0-cp314-cp314-macosx_15_0_arm64.whl CPython 3.14 CPython 3.14 macOS 15.0+ ARM64 Details
pythia8mc-8.318.0-cp313-cp313-macosx_15_0_arm64.whl CPython 3.13 CPython 3.13 macOS 15.0+ ARM64 Details
pythia8mc-8.318.0-cp312-cp312-macosx_15_0_arm64.whl CPython 3.12 CPython 3.12 macOS 15.0+ ARM64 Details
pythia8mc-8.318.0-cp311-cp311-macosx_15_0_arm64.whl CPython 3.11 CPython 3.11 macOS 15.0+ ARM64 Details
pythia8mc-8.318.0-cp310-cp310-macosx_15_0_arm64.whl CPython 3.10 CPython 3.10 macOS 15.0+ ARM64 Details
pythia8mc-8.318.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.5+ x86-64 Details
pythia8mc-8.318.0-cp39-cp39-macosx_15_0_arm64.whl CPython 3.9 CPython 3.9 macOS 15.0+ ARM64 Details
pythia8mc-8.318.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.5+ x86-64 Details
pythia8mc-8.318.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64 Details
pythia8mc-8.318.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64 Details
pythia8mc-8.318.0-cp35-cp35m-manylinux_2_5_x86_64.manylinux1_x86_64.whl CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64 Details
pythia8mc-8.318.0-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-64 Details
pythia8mc-8.318.0-cp27-cp27m-manylinux_2_5_x86_64.manylinux1_x86_64.whl CPython 2.7 CPython 2.7 pymalloc Linux glibc 2.5+ x86-64 Details

Total release size: 384.2 MB

Release files / pythia8mc-8.318.0.tar.gz

Download URL pythia8mc-8.318.0.tar.gz
Size 22.2 MB
Tags Source
SHA-256 checksum
How to use checksums
26e8b38592e2c45cfc46235ac2efb9031781adfe7bf824cb68d29b2108232b57
BLAKE2b-256 checksum
How to use checksums
63b32e24d513a2986352494fffd1af24117b3401b13ddb57b341f8d34aad4f63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/6.6.0 pkginfo/1.9.6 requests/2.30.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.10.11

Release files / pythia8mc-8.318.0-cp314-cp314-macosx_15_0_arm64.whl

Download URL pythia8mc-8.318.0-cp314-cp314-macosx_15_0_arm64.whl
Size 27.4 MB
Tags CPython 3.14 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
7dff7a686ffeccb11f559ca0a8f4fe54b2cc372cf4490b5d5d8454fd2aa61876
BLAKE2b-256 checksum
How to use checksums
7eaea9d21599622093ec0e45e288dbbafd8e0795cefc7b5b3769aff0c6e728be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/6.6.0 pkginfo/1.9.6 requests/2.30.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.10.11

Release files / pythia8mc-8.318.0-cp313-cp313-macosx_15_0_arm64.whl

Download URL pythia8mc-8.318.0-cp313-cp313-macosx_15_0_arm64.whl
Size 27.4 MB
Tags CPython 3.13 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
5b08470fca19a47cfd442b021badf2b680b25268b0b4b3b87b148294aed49d2a
BLAKE2b-256 checksum
How to use checksums
c36fdbee4add6d76cf62d16ff1e4d1b4989e94bf2762b9ed552a4711616f85e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/6.6.0 pkginfo/1.9.6 requests/2.30.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.10.11

Release files / pythia8mc-8.318.0-cp312-cp312-macosx_15_0_arm64.whl

Download URL pythia8mc-8.318.0-cp312-cp312-macosx_15_0_arm64.whl
Size 27.4 MB
Tags CPython 3.12 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
464f721ea55a84af6adbf0fde31cd76365814863c66d9c4fbdfa61472e7c1477
BLAKE2b-256 checksum
How to use checksums
1ba7178aa49e781b48063023259b616beb948b01294a8d14afdce3efcafb5f65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/6.6.0 pkginfo/1.9.6 requests/2.30.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.10.11

Release files / pythia8mc-8.318.0-cp311-cp311-macosx_15_0_arm64.whl

Download URL pythia8mc-8.318.0-cp311-cp311-macosx_15_0_arm64.whl
Size 27.4 MB
Tags CPython 3.11 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
452f34ee82eb2e786c435f4b1bad2993af9b76f6181a52c576e3d19caa0e1f7a
BLAKE2b-256 checksum
How to use checksums
77b9d06385a097f4c7cbb7a732e99fcfc091f50de8c895b36d3756b20435eeea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/6.6.0 pkginfo/1.9.6 requests/2.30.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.10.11

Release files / pythia8mc-8.318.0-cp310-cp310-macosx_15_0_arm64.whl

Download URL pythia8mc-8.318.0-cp310-cp310-macosx_15_0_arm64.whl
Size 27.4 MB
Tags CPython 3.10 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
5ab63a8b8102c93e6c1eea0475725ef5cdbb67779738f98300820b11f1bc6652
BLAKE2b-256 checksum
How to use checksums
4e7632ca525358516b2275b9e0b67558f159de23fe35dd94486377827dee3c21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/6.6.0 pkginfo/1.9.6 requests/2.30.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.10.11

Release files / pythia8mc-8.318.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl

Download URL pythia8mc-8.318.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Size 28.2 MB
Tags CPython 3.9 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
d75e5682e2014515a73bf6a0b6f90c02b4f419e7f83acdc331c14588c9ee709b
BLAKE2b-256 checksum
How to use checksums
2dadf4e09f52bcfb6ef57868bfa1c22bc5ac9a8f7de4fd936ed01132ec970eac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/6.6.0 pkginfo/1.9.6 requests/2.30.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.10.11

Release files / pythia8mc-8.318.0-cp39-cp39-macosx_15_0_arm64.whl

Download URL pythia8mc-8.318.0-cp39-cp39-macosx_15_0_arm64.whl
Size 27.4 MB
Tags CPython 3.9 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
68fa3d7e99f47a72955c8703ada4fa44d41af9ac4bc92b29913a9ae504d6df8a
BLAKE2b-256 checksum
How to use checksums
578f2094a990265f5f3208d2be258983d83e33eb79422d4b9b91f089feb7c18e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/6.6.0 pkginfo/1.9.6 requests/2.30.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.10.11

Release files / pythia8mc-8.318.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl

Download URL pythia8mc-8.318.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Size 28.2 MB
Tags CPython 3.8 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
6b05a3ffaea3632d2c3aac69b0790e2a91e8306bbdcc86a76e1b0158a8d5a708
BLAKE2b-256 checksum
How to use checksums
fbbd2a2d20e88a8376f266bb9c0c342c61055802d577a10e520f93d8d157e89d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/6.6.0 pkginfo/1.9.6 requests/2.30.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.10.11

Release files / pythia8mc-8.318.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl

Download URL pythia8mc-8.318.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Size 28.2 MB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
230cc9083b308ea8a691161f8da5b0ecf2123dd79c404425b53b163c9e8b3e97
BLAKE2b-256 checksum
How to use checksums
064c8d51e7207aceb2b92376639bd5c24f024c44bc8dfd7758fe1c294f5fed9a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/6.6.0 pkginfo/1.9.6 requests/2.30.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.10.11

Release files / pythia8mc-8.318.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl

Download URL pythia8mc-8.318.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Size 28.3 MB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
cb7e62d9b1ad5710b49afca41e6e70e7e60a9b7981e375f4abfaf8cc57988b7e
BLAKE2b-256 checksum
How to use checksums
d25b6f3fbbc6b0d64a943f66d36057d38cb716afafd51900577449cd8a512029
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/6.6.0 pkginfo/1.9.6 requests/2.30.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.10.11

Release files / pythia8mc-8.318.0-cp35-cp35m-manylinux_2_5_x86_64.manylinux1_x86_64.whl

Download URL pythia8mc-8.318.0-cp35-cp35m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Size 28.3 MB
Tags CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
7f7a498e0d8dba3390594f4c5c0fac0b5631a9f8b232def6a9b64b6456191f53
BLAKE2b-256 checksum
How to use checksums
218c4071698abee3879a286caea92c66f0c934487f4946b3cdef0b6ba472d2f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/6.6.0 pkginfo/1.9.6 requests/2.30.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.10.11

Release files / pythia8mc-8.318.0-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl

Download URL pythia8mc-8.318.0-cp27-cp27mu-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Size 28.3 MB
Tags CPython 2.7 CPython 2.7 pymalloc wide-unicode Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
d2ac8ccb60ff1856c9b52c1f041006592bdec8b34c654f8a385f24c01bb94559
BLAKE2b-256 checksum
How to use checksums
595da76a35117b5d899ff04d756c1ed32bada23b0b56dafedc4934c5dec03c3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/6.6.0 pkginfo/1.9.6 requests/2.30.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.10.11

Release files / pythia8mc-8.318.0-cp27-cp27m-manylinux_2_5_x86_64.manylinux1_x86_64.whl

Download URL pythia8mc-8.318.0-cp27-cp27m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Size 28.3 MB
Tags CPython 2.7 CPython 2.7 pymalloc Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
d75e3a380eb041858eea5e4335e1d346f4144a069ae64b3659ba24a607d195b3
BLAKE2b-256 checksum
How to use checksums
9bec8e178fefa2bfbf568d914f3dceeb88234d3a7ea508867ccc04ad24916f7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/6.6.0 pkginfo/1.9.6 requests/2.30.0 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.10.11
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page