-
Notifications
You must be signed in to change notification settings - Fork 43
Ubuntu 20.04 conda development quickstart
Loosely based on an older SciPy development quickstart for Ubuntu.
Last tested 2023-10-14 with:
- python 3.12.0
- numpy 1.26.0
- slycot commit 9485d94
Also tested against python-control@a11d3be, with one failure that isn't obviously Slycot related:
control/tests/config_test.py::TestConfig::test_default_deprecation
Note this bug : be sure to uninstall python3-numpy
from the system.
Install miniconda
Install the conda-build
package in the base environment. This is needed for running conda develop
during testing of Slycot.
conda install -n base conda-build
Create a conda environment slycotdev
with the necessary build requirements.
conda create --name slycot-dev --channel conda-forge python compilers numpy "setuptools>=45" "setuptools_scm>=6.3" "scikit-build>=0.14.1" cmake scipy pytest
If you're likely to install other packages (matplotlib, ipython, etc.) as you go along, make sure conda-forge
is the first channel for packages:
conda activate slycotdev
conda config --env --add channels conda-forge
Build inplace
conda activate slycotdev # if not already activated
python setup.py build_ext --inplace
Install in your development environment:
conda develop .
Run the tests:
pytest
If you've installed Slycot in your development environment (see conda develop .
above), you can use python-control to do more tests of Slycot. Use git to clone python-control, and in the python-control working tree run pytest
. You'll need to conda install matplotlib
to run the python-control tests.