Using a Virtual Environment
Using a virtual environment is recommended to isolate PyXAI’s dependencies from your system Python packages.
This example uses python3.10 but you can use python3.10, python3.11 or python3.12.
Create and activate a new virtual environment:
sudo apt-get install python3.10-venv
python3.10 -m venv env
source env/bin/activate
Update pip:
python3 -m pip install -U pip
With this new version of pip, it may happen that you have to clear the pip cache:
python3 -m pip cache purge
Now you can do the installation of PyXAI, two installation methods are available:
- With PyPI (recommended)
- With GitHub
If you want to install dependencies without an internet connection, you can build a requirements file from a computer with an internet connection:
python3 -m pip freeze > requirements.txt python3 -m pip download -r requirements.txt -d requirements-download/ pip install -r requirements.txt --find-links=requirements-download --no-index
For deactivating the environment:
deactivate