Install Anaconda if it is not already available on your system (I recommend the lightweight Miniconda). On Arch Linux, it can be installed from the AUR:
yay -Syu miniconda3
To set up an Anaconda virtual environment with the required tools (QGIS, Python, or R), save the snippet under the relevant section as a YAML file (e.g. environment.yml
). Then, run the following commands, replacing ${envname}
with the name of the environment as defined in the first line of the YAML file:
conda env create --file environment.yml
conda activate ${envname}
Note
All of these packages can be installed in a single Anaconda virtual environment via the conda-forge channel (though I haven’t checked to see if there are potential conflicts).
QGIS
name: qgis
channels:
- conda-forge
- defaults
dependencies:
- python=3
- qgis
Python
name: py-geo
channels:
- conda-forge
- defaults
dependencies:
- python=3
- geopandas
- matplotlib
- rioxarray
- rasterstats
- dask
- jupyterlab
- jupyter_bokeh
R
See this post for more information about setting up R to use with JupyterLab in an Anaconda environment.
name: r-geo
channels:
- conda-forge
- defaults
dependencies:
- r-base
- r-essentials
- r-rgdal
- r-rastervis
- r-sf
- r-geojsonio
- jupyterlab
Leave a comment
Your email address will not be published. Required fields are marked *.