Skip to content

DevNotes_CondaDevEnviroment

Steve K edited this page Aug 22, 2024 · 27 revisions

Example for setting up developers environment using pip and conda.

Note 1: This assumes that you have anaconda and git installed

Note 2: All commands should be executed from terminal (Terminal on OSX and Linux and Anaconda Prompt on Windows)

Note 3: The conda environment itself can be updated with the command

conda update --all

Setup conda environment:

conda create -n sasview_dev python=3.11

NB: (Sep 2023) We are starting to transition to Python 3.11. If building a conda environment with this, be aware that some of the pinning of dependencies in requirements.txt below may fail. In this instance, pip install each individually.

Activate the environment

conda activate sasview_dev

Clone sasview, sasdata, and sasmodels repositories

git clone https://github.com/SasView/sasview.git
git clone https://github.com/SasView/sasmodels.git
git clone https://github.com/SasView/sasdata.git

Install dependencies:

WARNING: For MAC OS you must FIRST run the following (as of Jan 11, 2024):

conda install conda-forge::pycairo

NOW: for ALL OS(including Mac) - Navigate to the sasview repository directory and run the command

pip install -r build_tools/requirements.txt

FINALLY: if you want GPU support run the following command

pip install pyopencl

Navigate to the sasview folder and run:

python run.py

If you already have an (old) environment and want to refresh it...

First, deactivate the environment

conda deactivate

This should drop you into the base environment. Then remove the required environment

conda remove --name ENV_NAME --all

For good measure then navigate to your Anaconda installation folder and the \envs subfolder. Delete any folder in there matching the environment you just removed.

Decide if you want to update conda itself (see Note 3 above).

Then proceed to set up a new environment.

Clone this wiki locally