forked from hofmannol/AlgoDatSoSe25
25 lines
716 B
Bash
Executable File
25 lines
716 B
Bash
Executable File
#!/bin/bash -u
|
|
|
|
#
|
|
# Source python venv (installed via curl https://pyenv.run | bash) to use specific python-version for this project without affecting system
|
|
# For Algorithms and Datastructures Class
|
|
#
|
|
# For WSLg support for matplotlib export="DISPLAY:0" and
|
|
# echo "backend: TkAgg" > ~/.config/matplotlib/matplotlibrc
|
|
|
|
export PYENV_ROOT="$HOME/.pyenv"
|
|
export PATH="$PYENV_ROOT/bin:$PATH"
|
|
export PYTHONPATH=".:$PYTHONPATH"
|
|
eval "$(pyenv init --path)"
|
|
eval "$(pyenv init -)"
|
|
eval "$(pyenv virtualenv-init -)"
|
|
|
|
# Create virtualenv if it doesn't exist
|
|
if ! pyenv versions | grep -q AUD; then
|
|
echo "Creating Python environment..."
|
|
pyenv install -s 3.12.0
|
|
pyenv virtualenv 3.12.0 AUD
|
|
fi
|
|
|
|
pyenv activate AUD
|