Dev environment

Last week, we created an environment ita21 and installed COMPAS 1.8.1. Now, we will create a second environment ita21-dev and install the core COMPAS packages "from source". The complete set of commands is as follows.

conda create -n ita21-dev python=3.9 cython --yes
conda activate ita21-dev
git clone https://github.com/compas-dev/compas.git
cd compas
pip install -e .

To check the installation, launch an interactive Python interpreter (type python on the command line) and print the version of compas. If it has a weird string attached at the end, the installation process was succesfull.

>>> import compas
>>> compas.__version__
'1.8.1-be2eaf'
>>> exit()

The weird string at the end is the identifier of the active changeset of the COMPAS repository.

Don't forget to exit the interactive Python interpreter. Type exit() at the interpreter prompt (>>>) and hit enter.

Step-by-step

Create an environment ita21-dev and install Python 3.9 (python=3.9) and cython. Say "yes" to all confirmation requests (--yes).

conda create -n ita21-dev python=3.9 cython --yes

Activate the new environment.

conda activate ita21-dev

Next, we will clone the compas repository from the compas-dev organization on GitHub. Note that this will create a folder in the current working directory with the contents of the repo. Therefore, make sure to navigate to the directory where you would like to store code repositories before cloning.

For example, i keep all code repositories in a folder Code on my home drive. Therefore i would do the following.

cd %USERPROFILE%/Code
git clone https://github.com/compas-dev/compas.git

Finally, change to the directory that was just created and install an "editable copy" of the core COMPAS packages from the local source.

cd compas
pip install -e .

Install with planarity on Windows

Since installing planarity with pip can cause issues, we have made it an optional requirement on Windows. To install COMPAS with planarity on Windows you have to change the last line of the instructions listed above.

pip install -e .[planarity]

However, make sure to solve the known issues first, as documented here: https://compas.dev/compas/latest/installation.html#known-issues-1

Install for Rhino/GH and Blender

Note that before you can use the new environment in Rhino/GH and/or Blender, it must be installed.

For Rhino.

python -m compas_rhino.install -v 7.0

For Blender.

python -m compas_blender.install -v 2.93

Last updated