-
Notifications
You must be signed in to change notification settings - Fork 417
Setup development environment with conda
This creates an environment with Numpy, Scipy, Matplotlib, and Slycot, and in which changes you make to python-control are immediately available. "Immediately" is not quite true: in a continuously running Python environment, you will have to reload python-control to make any changes have an effect; you could use the IPython autoreload
extension for that.
This method uses conda to get the latest releases of Numpy, Slycot, etc., in an isolated environment. You can create as many environments as you need, e.g., one for each different version of Python.
First, install conda-build
in your base environment; it is need to run the final conda develop .
command.
conda install conda-build
Next, create the environment. control-dev
is the environment name, which you can change. The instructions below cause the environment to get packages from conda-forge
, where Slycot is available.
conda create -n control-dev
conda activate control-dev
conda config --env --add channels conda-forge
conda config --env --set channel_priority strict
Now install the packages you need. Depending on what you're doing and how you go about developing and testing, you could add other packages, e.g., IPython or Jupyter Lab.
conda install slycot scipy matplotlib pytest pytest-timeout
Finally, add your python-control source to the control-dev
environment. This command must be run inside your python-control working tree:
conda develop .
You can check that everything is OK by running pytest
in the root of the python-control working tree.