Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,30 @@ requires a Geant4 installation.

## Install a prebuilt wheel

### Create a virtual environment first

Always install into a fresh virtual environment. Installing into the system
Python or conda's `base` environment mixes this package with whatever is already
there (other Qt/PyQt, numpy or Geant4 builds), which is the most common cause of
library mismatch errors. On recent Ubuntu/Debian, `pip install` outside a
virtual environment is refused with `externally-managed-environment`.

```bash
python3 -m venv g4-env
source g4-env/bin/activate
python -m pip install --upgrade pip
```

or with conda:

```bash
conda create -n g4 python=3.12 -y
conda activate g4
```

Activate the environment again in every new terminal. All commands below assume
it is active.

### From PyPI

```bash
Expand Down
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,29 @@ reach out to kavyavadhwa@gmail.com.
## Installation

The package is published on
[PyPI](https://pypi.org/project/geant4-python-application/):
[PyPI](https://pypi.org/project/geant4-python-application/). Install it into a
fresh virtual environment: mixing it with packages already in your system or
base conda Python (other Qt/PyQt, numpy or Geant4 builds) is the most common
cause of library mismatch errors.

```bash
python3 -m venv g4-env
source g4-env/bin/activate
python -m pip install --upgrade pip
pip install "geant4-python-application[gui]"
```

With conda, create a new environment instead of using `base`:

```bash
conda create -n g4 python=3.12 -y
conda activate g4
pip install "geant4-python-application[gui]"
```

Activate the environment again (`source g4-env/bin/activate` or
`conda activate g4`) in every new terminal before using the package.

- Prebuilt wheels for macOS (Apple Silicon and Intel) and Linux x86_64, Python
3.8–3.13. Geant4 is bundled, so no separate Geant4 (C++) installation is
needed.
Expand Down
9 changes: 5 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ build-backend = "scikit_build_core.build"
requires = ["scikit-build-core>=0.3.3", "pybind11"]

[project]
# Names only: PyPI shows just the first person when authors carry emails.
authors = [
{ name = "Luis Antonio Obis Aparicio", email = "luis.antonio.obis@gmail.com" },
{ name = "Kavya Wadhwa", email = "kavyavadhwa@gmail.com" },
{ name = "Luis Antonio Obis Aparicio" },
{ name = "Kavya Wadhwa" },
]
maintainers = [
{ name = "Luis Antonio Obis Aparicio", email = "luis.antonio.obis@gmail.com" },
{ name = "Kavya Wadhwa", email = "kavyavadhwa@gmail.com" },
{ name = "Luis Antonio Obis Aparicio" },
{ name = "Kavya Wadhwa" },
]
classifiers = [
"Intended Audience :: Developers",
Expand Down
Loading