Installation¶
The easy way¶
The recommended way to install LinkBikeNet is using conda (or the faster mamba) via the conda-forge channel:
conda install linkbikenet -c conda-forge
For more installation options, see below.
With pip¶
LinkBikeNet can also be installed with pip, if all dependencies can be installed as well:
pip install linkbikenet
Warning
We do not recommend using pip, because you need to make sure that all dependencies of linkbikenet are installed correctly. Using conda, see above, avoids the need to compile the dependencies yourself.
Environment installations¶
Creating a new environment is not strictly necessary, but given that installing other geospatial packages from different channels may cause dependency conflicts, it can be good practice to install in a clean environment starting fresh.
The main step is to set up a virtual environment lbnenv in which to
install the package, and then to use or run the environment. Use either of the methods below.
With conda¶
Installation with conda (or the faster mamba). The following commands create the lbnenv environment, configures it to install packages always from conda-forge, and installs LinkBikeNet in it:
conda create -n lbnenv
conda activate lbnenv
conda config --env --add channels conda-forge
conda config --env --set channel_priority strict
conda install python=3 linkbikenet
With Pixi¶
The fastest and cleanest way to install LinkBikeNet is via Pixi:
pixi init
pixi add linkbikenet
Then use the Pixi environment as so:
pixi shell
Note
The first time you run code with Pixi, it might take a minute longer, as Pixi resolves the environment’s dependencies only at this point.
Run linkbikenet in Jupyter lab¶
After having set up the environment above, if you wish to run linkbikenet via JupyterLab, follow the corresponding instructions below.
With conda¶
Using conda (or the faster mamba), run:
conda activate lbnenv
ipython kernel install --user --name=lbnenv
conda deactivate
jupyter lab
Once Jupyter lab opens, switch the kernel (Kernel > Change Kernel > lbnenv)
With Pixi¶
Once you are in the Pixi shell, see above, simply run jupyter lab:
jupyter lab
With pip¶
Using pip, run:
pip install --user ipykernel
python -m ipykernel install --user --name=lbnenv
jupyter lab
Once Jupyter lab opens, switch the kernel (Kernel > Change Kernel > lbnenv)
Development installation¶
If you want to develop the project, clone this
repository
and create the environment via Pixi and the
environment-dev.yml file:
pixi init --import environment-dev.yml
The development environment is called lbnenvdev. At this point you can run linkbikenet in the environment, for example as
such:
pixi run python examples/mwe.py
Note
The first time you run code with Pixi, it might take a minute longer, as Pixi resolves the environment’s dependencies only at this point.
Alternatively, start a pixi shell:
pixi shell
Make sure to also read our contribution guidelines.