Installation

Note

This page talks about installing Genv on a single machine. If you are interested in using Genv on a multi-machine cluster, check out the remote installation guide.

Warning

If you installed Genv previously (versions <= 0.12.0), you will need to manually remove the old version first.

System Administrators

Install Genv from PyPI using sudo with the following command:

sudo pip install genv[admin]

Note

Using sudo ensures the installation is system wide so that all users on the machine and in the cluster can use Genv and that administrators will be able to use privileged Genv capabilities such as monitoring and enforcing.

Users will also need their shells to be initialized in order to use the terminal integration of Genv and commands like genv activate. Use the following command to set up their shells:

sudo tee /etc/profile.d/genv.sh > /dev/null << EOF
if command -v genv &> /dev/null
then
   eval "\$(genv shell --init)"
fi
EOF

Note

You can verify the installation with the command:

$ genv --help
usage: genv [-h] SUBCOMMAND ...

Users

If you do not have administrative permissions and can’t install system-wide using sudo, you can install Genv for your user using pip and conda depending on your environment..

Warning

However, this method limits accessibility to other users on the machine or in the cluster and does not provide access to privileged capabilities such as monitoring and enforcing.

Using pip

Genv is available on PyPI and is available for installation using pip with the following command:

pip install genv

Warning

If you see a warning message similar to the following, add the specified directory to your $PATH by editing your ~/.bashrc and restarting your shell:

WARNING: The script genv is installed in '$HOME/.local/bin' which is not on PATH.
Consider adding this directory to PATH...

To use the terminal integration of Genv and commands like genv activate, add the following command to your ~/.bashrc or any other equivalent file:

eval "$(genv shell --init)"

Note

You can verify the installation with the command:

$ genv --help
usage: genv [-h] SUBCOMMAND ...

If you see genv: command not found then your $PATH is probably no set as explained above.

Using Conda

If you are using Conda, you can install the genv package from the channel conda-forge:

conda install -c conda-forge genv

Integrations

Visual Studio Code

Installation is done from the Visual Studio Marketplace.

For more information please refer to the project repository.

JupyterLab

Installation is documented here.

For more information please refer to the project repository.

PyCharm

Currently, there is no PyCharm plugin for Genv. This is however part of the project roadmap.

In case you use PyCharm, please open an issue in the project repository.

This will help us prioritize this as well as suggest other ways to work with Genv in PyCharm in the meantime.

Docker

To install the genv-docker refer to the Genv container toolkit installation page.

Ray

To install the Ray integration of Genv read here.

Remove Old Version

If you installed Genv previously (versions <= 0.12.0) and not from Conda, you will need to manually remove the old version first.

You can check it by running the following command:

genv root >& /dev/null && echo old version installed

If you see old version installed, you have an old version installed and you need to remove it.

First, remove the commands you added to your ~/.bashrc or any other equivalent file. They should look like this:

export PATH=$HOME/genv/bin:$PATH
eval "$(genv init -)"

Afterward, remove the previous installation directory with the following command:

rm -rf $(genv root)

Then, restart your terminal.