pyenv
allows you to install multiple python versions side by side in your local user environment. This installation method is preferred over using conda
to install pdm
- Install pyenv: Follow the
pyenv
installation instructions here. There are just two steps. - Download and install
pyenv
- Add
pyenv
functions to your shell configuration.
Navigate to the cellPACK
folder and install the required python version.
pyenv install $(cat .python-version)
The .python-version
file in this repo tells pyenv
to load Python 3.9 when you are inside the cellPACK
directory.
Check that this is working with which python && python --version
.
Detailed installation instructions are available here.
For Linux or MacOS, install pdm
for your user as follows.
- Download the installer
curl -sSLO https://pdm.fming.dev/install-pdm.py
- Validate that the installer has not been tampered with
curl -sSL https://pdm.fming.dev/install-pdm.py.sha256 | shasum -a 256 -c -
- Using Python 3.9, run the installer.
python install-pdm.py
Warning
With this installation method pdm
will be tied to the exact python version used to install it. If you installed with Python 3.9.13, for example, and you later transition to Python 3.9.17, do not uninstall Python 3.9.13.
pdm
will be installed into $HOME/.local/bin
. Check that your version is at least 2.10.
$ pdm --version
PDM, version 2.10.4
From the cellPACK
directory, use pdm
to install the dependencies.
pdm sync -d
This will create a virtual environment at cellPACK/.venv
. You can activate it with eval $(pdm venv activate)
or source .venv/bin/activate
.
To modify the project dependencies, see our instructions for using pdm.
To run the tests:
pdm run pytest