Skip to content

Setting Up PyENV for this Repository

Joel Mathew Thomas edited this page Feb 24, 2025 · 11 revisions

Setting Up PyENV for this Repository

This guide provides step-by-step instructions on installing pyenv, configuring it for your shell.


Step 1: Install Pyenv

To install pyenv, run the following commands based on your operating system.

Arch Linux:

sudo pacman -S pyenv

Ubuntu

sudo apt install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev

curl https://pyenv.run | bash

Add the following lines to your shell config , ~/.bashrc if you use bash, or ~/.zshrc if you use zsh

export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"

Confirming PyENV installation.

pyenv --version

Step 2: Install the required Python version

For this project, we are using Python 3.12.7

pyenv install 3.12.7

Step 3: Setup virtual environments

Navigate to the project directory, and create a virtual environment. It is not necessary to set the local python version for the directory with pyenv, as the repository already includes the file for that.

python -m venv venv
source venv/bin/activate

Step 4: Install dependencies

Make sure the python version used for the venv, is the required one.

python --version

Clone the repository and change the directory to it.

Install freqsplit

pip install -e .

Install dependencies

pip install -r requirements.txt