Installation
COMPAS can be easily installed on multiple platforms, using popular package managers such as conda or pip.
Install with conda (recommended)
Create an environment named research
and install COMPAS from the package channel conda-forge
.
conda create -n research -c conda-forge compas
Activate the environment.
conda activate research
Verify that the installation was successful.
python -m compas
Yay! COMPAS is installed correctly!
Installation options
Install COMPAS in an environment with a specific version of Python.
conda create -n research python=3.8 compas
Install COMPAS in an existing environment.
conda install -n research compas
Install with pip
Install COMPAS using pip
from the Python Package Index.
pip install cython --install-option="--no-cython-compile"
pip install compas
Install an editable version from local source.
cd path/to/compas
pip install -e .
By default, planarity
is marked as an optional requirement for installation with pip
on Windows.
To include planarity
, add a conditional to the install command.
pip install compas[planarity]
pip install -e .[planarity]
Update with conda
Update COMPAS to the latest version with conda
.
conda update compas
Install a specific version.
conda install compas=1.13.3
Update with pip
Update COMPAS to the latest version with pip
.
pip install --upgrade compas
Install a specific version.
pip install compas==1.13.3
Known Issues
If you encounter a problem that is not described here, please file an issue using the Issue Tracker.
Installing Planarity
The installation process with pip
can fail while installing planarity
, because cython
is not installed.
If this is the case, install cython
using pip
(or conda
), before installing COMPAS.
pip install cython --install-option="--no-cython-compile"
pip install compas
Microsoft Visual C++ Build Tools
The installation with pip
can fail because “Microsoft Visual C++ Build Tools are missing”.
To install the Microsoft Visual C++ Build Tools choose one of the options provided
here: https://www.scivision.dev/python-windows-visual-c-14-required/
and just follow the instructions.
Then run the pip
installation commands again.
RuntimeError: The current Numpy installation (…) fails to pass a sanity check
If you see this error, it means latest Numpy 1.19.4 could not init due to a bug from windows.
To avoid it, simply downgrade Numpy by pip install numpy==1.19.3
See the detail of the bug here: https://github.com/numpy/numpy/issues/17726