Skip to main content

Primary links

  • Home
  • AI
  • Kubernetes
  • Incus
  • Ansible
  • Terraform
  • OpenStack
  • Virtualization
  • Linux
  • SmartHome
  • HowTo

Misc

  • Linux
  • Hardware
  • Programming
  • Databases
  • Multimedia
  • Windows

Cloud

  • OpenStack
  • cloud-config
  • nextcloud

Virtualization

  • Virtualization
  • Incus
  • Docker
  • KVM
  • Kubernetes
  • LXC
  • LXD
  • QEMU
  • VMware
  • VirtualBox
  • multipass
  • podman
  • vagrant
  • XEN

Network

  • DNS
  • Firewall
  • Linux
  • OpenvSwitch
  • SSL
  • VLAN
  • VPN
  • iPXE
  • namespaces
  • nmcli
  • tcpdump

Storage

  • CEPH
  • DRBD
  • LVM
  • S3
  • ZFS
  • btrfs

Automation / CI/CD

  • Install
    • bind9 named
    • NX Client
    • FreeNX Server
    • Archive
    • Asterisk
    • Audio Recorder
    • Build essential
    • Chromium
    • Couch DB
    • DMA
    • DVD
    • Dovecot
    • Eclipse
    • FTP server
    • Firefox
    • GWT
    • Games
    • Gimp
    • Glassfish
    • Gnome classic
    • Google Music Manager
    • HAproxy
    • HTTrack
    • Hibiscus
    • Icinga
    • Install Cinnamon
    • Install thttpd
    • Install vivaldi
    • Java JDK
    • Jenkins
    • Kodi
    • LTSP
    • LXC
    • LibreOffice
    • Mailserver
    • MariaDB
    • Microsoft teams
    • MiniDLNA
    • Mosquitto MQTT server
    • MySQL Connector/J
    • MySQL Server
    • MySQL Workbench
    • Nemo
    • NetBeans
    • Node-RED
    • Obnam
    • OpenElec PXE
    • OpenFortiGUI
    • Oracle XE
    • Postfix
    • ProjectLibre
    • Proton VPN
    • Proton VPN
    • Roundcubemail
    • Ruby on Rails
    • Rundeck
    • SQL Developer
    • SQuirreL SQL
    • Scribus
    • Skype
    • SonarQube
    • Spotify
    • Squid
    • SteuerSparErklärung
    • TeamViewer
    • Thunderbird
    • Tipp10
    • Tomcat
    • Ubuntu restricted extras
    • UnixBench
    • VLC player
    • VMware Player
    • Vega
    • VirtualBox
    • Visual Studio Code
    • Webserver
    • Wine
    • WordPress
    • apt-cacher-ng
    • autofs
    • avidemux
    • ckeditor
    • consul
    • ddrescue
    • duplicity
    • easytax
    • gbrainy
    • gitea
    • gnokii
    • gogs
    • gopenvpn
    • hddtemp
    • homebridge
    • iSCSI
    • jitsi
    • lm-sensors
    • mattermost
    • myTinyTodo
    • neatx
    • netdata
    • nullmailer
    • openproject
    • phpMyAdmin
    • pip
    • pipelight
    • proftpd
    • prometheus
    • pyenv
    • rTorrent
    • restic
    • rustdesk
    • smartmontools
    • snap
    • speedtest
    • sshuttle
    • stress test
    • syslinux
    • tftp server
    • tinyproxy
    • topgrade
    • uShare
    • x2go
  • Ansible
  • GitLab
  • LLM
  • Preseed
  • Puppet
  • Terraform
  • Ubuntu autoinstall

Monitoring / Visualisation

  • Grafana
  • Icinga
  • Prometheus
  • Monitoring
  • ELK
  • mermaid
  • pyenv

List available pyenv versions
https://www.python.org/ftp/python/

pyenv install --list

virtualenv

pip install -U virtualenv --user
mkdir -vp ~/test
cd ~/test
virtualenv .venv
source .venv/bin/activate
pip install -U pip
pip install -U python-openstackclient

Pyenv and virtualenv

sudo apt install -y git build-essential libbz2-dev libreadline-dev libssl-dev zlib1g-dev libsqlite3-dev wget curl libncurses5-dev libncursesw5-dev xz-utils libffi-dev liblzma-dev

git clone https://github.com/pyenv/pyenv.git ~/.pyenv
git clone https://github.com/pyenv/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv

echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init --path)"\n  eval "$(pyenv init -)"\n  eval "$(pyenv virtualenv-init -)"\nfi' >> ~/.bashrc

exec "$SHELL"  # or re-login

pyenv install 3.8.12
pyenv local 3.8.12
pyenv virtualenv 3.8.12 kolla-ansible-xena
pyenv activate kolla-ansible-xena

pyenv --version
pyenv virtualenvs
pyenv versions

pip install -U pip
pip install -U 'ansible<2.10'
pip install -r requirements.txt
# python setup.py install

Global pyenv configuration

# /etc/bash.bashrc

export PYENV_ROOT=/usr/local/pyenv
if command -v pyenv 1>/dev/null 2>&1; then
  export PATH="$PYENV_ROOT/bin:$PATH"
  eval "$(pyenv init - --no-rehash)"
  eval "$(pyenv virtualenv-init -)"
fi

Deploy pyenv with ansible role
https://github.com/staticdev/ansible-role-pyenv

- name: Install staticdev.pyenv role from Ansible Galaxy
  become: no
  local_action: command ansible-galaxy role install staticdev.pyenv

- name: Configure system pyenv
  include_role:
    name: staticdev.pyenv
  vars:
    pyenv_env: "system"
    pyenv_shellrc_file: "{% if pyenv_env == 'user' %}~/.bashrc{% else %}/etc/profile.d/pyenv.sh{% endif %}"
    pyenv_path: "{% if pyenv_env == 'user' %}{{ ansible_env.HOME }}/pyenv{% else %}/usr/local/pyenv{% endif %}"
    pyenv_owner: "root"
    pyenv_global:
      - osc
    pyenv_update_git_install: no
    pyenv_enable_autocompletion: yes
    pyenv_python_versions:
      - 2.7.18
      - 3.9.16      
    pyenv_virtualenvs:
      - venv_name: "python2"
        py_version: "2.7.18"
      - venv_name: "osc"
        py_version: "3.9.16"

Define multiple global default virtualenvs

# cat /usr/local/pyenv/version
python3
osc
kolla-ansible

Links
https://github.com/pyenv/pyenv
https://github.com/pyenv/pyenv/blob/master/COMMANDS.md#pyenv-global
https://github.com/pyenv/pyenv-virtualenv

Profiles GitHub StackOverflow LinkedIn Xing
Contact Imprint
© panticz 2026

Cookie-Einstellungen

Diese Website nutzt eingebettete Inhalte von Drittanbietern (z.B. YouTube, SoundCloud). Beim Laden dieser Inhalte werden Daten an die jeweiligen Anbieter übermittelt. Datenverarbeitungserklärung