Installation¶
The recommended way to install PyFasma is by using Conda to manage the Python environment. Poetry is used for dependency management and packaging. An alternative Poetry-only method is also available.
Conda + Poetry (Recommended)¶
Download and install Miniconda if you do not already have Conda installed.
Create and activate a Conda environment:
conda create -n pyfasma python=3.12 conda activate pyfasma
Install Poetry inside the environment:
pip install poetry
Clone the PyFasma repository:
git clone https://gitlab.com/lepa22/pyfasma.git cd pyfasma
Configure Poetry to use the Conda environment:
poetry config virtualenvs.create false --local
Install the package and dependencies:
poetry install
(Optional) Install extras (e.g., Jupyter, Excel support):
poetry install --extras "extras"
Poetry-only (Alternative)¶
This method creates and manages a virtual environment automatically, scoped to the project directory.
Install Poetry:
curl -sSL https://install.python-poetry.org | python3 -
Clone the PyFasma repository:
git clone https://gitlab.com/lepa22/pyfasma.git cd pyfasma
Install the package and dependencies:
poetry install
Activate the virtual environment:
poetry shell
(Optional) Install extras:
poetry install --extras "extras"
Note
When using the Poetry-only installation, all Poetry commands (e.g., poetry shell
, poetry run python
) must be executed from within the project directory (where pyproject.toml
is located).
Poetry environments are tied to the project, unlike Conda environments which can be activated globally.