Skip to content

Installation

mwong009 edited this page Jun 20, 2024 · 1 revision

Before you begin, ensure you have met the following requirements:

  • You have miniconda installed on your system

PyCMTensor is available on Conda Forge. You can install it using the following command:

conda update -n base -c defaults conda
conda install -c conda-forge pycmtensor

For isolated development or testing, we recommend installing PyCMTensor in a virtual environment:

conda create -n pycmtensor -c conda-forge pycmtensor
conda activate pycmtensor

You can verify your installation by checking the version of PyCMTensor:

python -c "import pycmtensor as cmt; print(cmt.__version__)"

Updating PyCMTensor

To update PyCMTensor to the latest version, run the following command:

conda update pycmtensor

Source code

If you want to contribute to the project or prefer to build from source, you can clone the source code from the GitHub repository:

git clone https://github.com/mwong009/pycmtensor.git

Change your current directory to the cloned repository:

cd pycmtensor

Create a new Conda environment using the provided environment.yml file, and activate it:

conda env create -f environment.yml
conda activate pycmtensor
conda install ipykernel poetry
poetry install --with docs,test,lint

This will set up a development environment with all the necessary dependencies installed. You can now start contributing to PyCMTensor or build it from source.

Clone this wiki locally