Installation
[Git clone : pvgis] [Install via pip : pip install git+]
Under active development
This page is under development and subject to change!
Requirements¶
Environment setup¶
To begin with, create a Python virtual environment! and activate it :
Virtual environment name
.venv is the name selected for the virtual environment above. Using this name, git will automatically ignore files inside this directory, as this specific name is registered in .gitignore.
Disallow to install outside a virtual environment
Forgetting to activate a virtual environment will install various packages outside virtual environments at a system-wide level which, over time, will likely lead to errors.
By setting for example in .bashrc or .zshrc the environment variable PIP_REQUIRE_VIRTUALENV to true and re-starting your shell, pip will refuse to install anything outside a virtual environment.
Use direnv to work seamlessly with virtual environments
Regardless of our favourite programming language
or tool to manage environments,
chances are high we'd benefit from using direnv.
In the context of a Python package,
direnv supports all such well known tools
from standard venv, pyenv and pipenv,
to anaconda, Poetry, Hatch, Rye
and PDM.
Have a look at direnv's Wiki page for Python.
pvgis is developed inside a virtual environment
(re-)created and (re-)activated via direnv.
The following .envrc does all of it :
Find more about layout python in direnv/wiki/Python#venv-stdlib-module.
Installation from PyPi¶
Coming soon!
Installation from source¶
Simple install¶
Once inside a dedicated virtual environment, we can install PVIS with a single command using pip, Python's standard package installer:
Install a tagged version¶
Coming soon!
Install using uv¶
First install uv into your virtual environment:
And run:
Conda¶
In order to install the software using conda (instructions for installing conda can be found here):
-
First clone the software to get the latest changes:
-
Then, navigate into the source code directory:
-
Create the conda environment by running the following command. This will create an new conda environment named
pvgisand install the PVGIS software along with its dependencies using theenvironment.ymlfile that is distributed with the software: -
Finally, activate the conda environment:
For Developers¶
Curious to explore the latest (non-released development) version? Want to modify some function or add a new one and contribute to PVGIS? You can install PVGIS in an editable mode.
Using pip¶
-
Clone the source code repository
-
Step in the source code directory
-
Install in editable mode
Using uv¶
Similarly to the above instructions, you can use uv to install PVGIS in editable mode.
Warning
PVIS is under development so for the time being you may want to install either all dependencies or the dev ones. For the latter option, you can do
This will install all of : the core API and the CLI.
Note
The installation will include Rich. Rich is a library to display visually pleasing information on the terminal. It is deeply integrated into PVGIS.
Verify¶
We can verify the installation was successful by running any command (i.e. pvgis) or asking for the version of the installed package:
After the installation¶
- Interact with PVIS through the command line interface (CLI).
- Use the Python API in your scripts.
Uninstall¶
You can uninstall pvgis with pip:
If you are using uv, run:
This removes the pvgis package from your current environment.