Skip to content
This repository has been archived by the owner on Dec 10, 2020. It is now read-only.

Conda Setup

Kewei Li edited this page Jun 3, 2019 · 6 revisions

This guide assumes that you're running Ubuntu, although most of it should apply to other Unix base systems. On Windows you can use WSL.

First download and install Anaconda/Miniconda. The rest of the guide assumes that you have miniconda3 installed under your home directory. If you have some other setup, use that directory instead in the paths below. From within the QMT repository, can then create the environment with

conda env create -f ./deployment/environment_full_linux.yml

This creates an environment named py36. You can now activate that environment with

conda activate py36

Before we can start using the environment, we need to make freecad available to python. You can find the path to freecad by running

find $HOME/miniconda3/pkgs/ -maxdepth 1 -type d -name "freecad*"

Append /lib to the output from that command and echo it to our environment's site-packages:

echo "[output from previous command]/lib" > ~/miniconda3/envs/py36/lib/python3.6/site-packages/freecad.pth

The final step is to make QMT itself available to conda. Run

conda develop [path to QMT]

And you should have a working QMT environment! The last thing to do is to set up pre-commit hooks so that your code is automatically formatted with black upon commit

pre-commit install
Clone this wiki locally