Installing lazylinop

Installing lazylinop with PIP

Creating a virtual environment

First, you need to create your virtual environment into a directory reserved to lazylinop:

python3 -m venv test_lazylinop_venv
Note

For Windows users the command is rather:

py -3 -m venv test_lazylinop_venv

Second, you need to enable the virtual environment:

source ./test_lazylinop_venv/bin/activate
Note

For Windows users the command is rather:

C:\> call .\test_lazylinop_venv\Scripts\activate

Then, if all worked correctly you should see the test_lazylinop_venv prompt of your virtual environment.

Installing the lazylinop package

It remains now to install lazylinop in the environment you just created.

If you downloaded the whl package the command is:

pip install lazylinop-*.whl

Otherwise, a simpler way is to directly install lazylinop from the public PYPI repository:

pip install lazylinop

You can launch this python command to validate the installation:

python -c 'from lazylinop import __version__; print(__version__)'

If all went properly you should see the version of installed lazylinop.

Dependencies

Lazylinop is delivered with the minimal set of package dependencies.

If you want to test all features of Lazylinop you can install the complementary dependencies:

pip install -r lz_requirements.txt

Download the dependency file lz_requirements.txt.

Installing lazylinop with Anaconda

The lazylinop package is also available on a dedicated conda repository. Follow the next commands to install lazylinop for Anaconda.

Create and enable a dedicated environment:

conda create -y -n lazylinop_venv
conda activate lazylinop_venv

A Python version specifier (e.g. python==3.11) might be added at the end of the conda create command in order to use a specific version of Python.

Add necessary anaconda channels:

The channel conda-forge is necessary for installing numpy and scipy. Both of them are dependencies of lazylinop.

conda config --add channels conda-forge
conda config --add channels lazylinop

Then you are ready to install the lazylinop package:

conda install lazylinop

Finally, test that the install succeeded:

python -c 'from lazylinop import __version__; print(__version__)'

It should print the version of lazylinop you just installed.