👨‍💼pyenv ve virtualenv ile birden fazla python sürümü yönetimi

PyEnw ve VirtualEnv Eklentisi Kurulumu

  • git ile indirme işlemini yapacağız

# sudo apt install git
git clone  <https://github.com/pyenv/pyenv.git> ~/.pyenv

# Pyenv içerisine virtual-env eklentisini kuruyoruz
git clone <https://github.com/pyenv/pyenv-virtualenv.git> $(pyenv root)/plugins/pyenv-virtualenv

Bash İçerisine Dahil Etme

  • bashrc (mac için zshrc) sonuna aşağıdaki alanı ekleyin

  • Bu sayede pyenv'i PATH'e ekliyoruz

# Pyenv settings
export PYENV_ROOT="${HOME}/.pyenv"
if [ -d "${PYENV_ROOT}" ]; then
    export PATH=${PYENV_ROOT}/bin:$PATH  
    eval "$(pyenv init -)"
		eval "$(pyenv virtualenv-init -)"
fi

PyEnv ile Python Kurulumu

  • Ubuntu / Debian için gereksinimlerin kurulumu

  • RaspberryPi için gereksinimlerin kurulumu

  • -l komutu indirilebilenleri listeler

  • grep ile python 3.11 sürümlerini filtreliyoruz

VirtualEnv Oluşturma

Bağlantılar

What is the difference between venv, pyvenv, pyenv, virtualenv, virtualenvwrapper, pipenv, etc?

Raspberry Pi Tips

Managing Multiple Python Versions With pyenv - Real Python

Last updated

Was this helpful?