diff --git a/INSTALLATION.md b/INSTALLATION.md index 5b321f8..c806dbd 100644 --- a/INSTALLATION.md +++ b/INSTALLATION.md @@ -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 diff --git a/README.md b/README.md index 8dc2f66..e5742c2 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,9 @@ [![PyPI](https://img.shields.io/pypi/v/geant4-python-application)](https://pypi.org/project/geant4-python-application/) [![Python](https://img.shields.io/pypi/pyversions/geant4-python-application)](https://pypi.org/project/geant4-python-application/) +[![Downloads](https://static.pepy.tech/badge/geant4-python-application)](https://pepy.tech/projects/geant4-python-application) +[![Downloads/month](https://static.pepy.tech/badge/geant4-python-application/month)](https://pepy.tech/projects/geant4-python-application) +[![Views](https://hits.sh/github.com/lobis/geant4-python-application.svg?label=views)](https://hits.sh/github.com/lobis/geant4-python-application/) [![Wheels](https://github.com/lobis/geant4-python-application/actions/workflows/wheels.yaml/badge.svg)](https://github.com/lobis/geant4-python-application/actions/workflows/wheels.yaml) [![Build and Test](https://github.com/lobis/geant4-python-application/actions/workflows/build-test.yaml/badge.svg)](https://github.com/lobis/geant4-python-application/actions/workflows/build-test.yaml) @@ -38,12 +41,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. diff --git a/pyproject.toml b/pyproject.toml index 4ab5e53..3d20533 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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",