Trying to install python 3.8.5 on ubuntu 18.04

This page summarizes the projects mentioned and recommended in the original post on /r/ansible

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • pyenv-installer

    This tool is used to install `pyenv` and friends.

  • --- - name: Configure server. hosts: pyenv2 vars: python3_tmpdir: "~/python3" python3_command: python3 python3_bashrc: "{{ ansible_user_dir}}/.bash_profile" python3_local: "{{ ansible_user_dir}}/.local/bin" pre_tasks: - name: update apt become: yes apt: update_cache=yes cache_valid_time=7200 tasks: - name: Install requirements for package install become: yes package: name: - python3-pip - python3-virtualenv - python3-dev - virtualenv state: present - name: Install system packages required for pyenv become: yes package: name: - curl - gcc - git - libbz2-dev - libreadline-dev - libssl-dev - libsqlite3-dev - make - zlib1g-dev state: present - name: Install Python using pyenv environment: PATH: "{{ ansible_env.PATH }}:{{ ansible_user_dir }}/.pyenv/bin" block: - name: Create download directory file: path: "{{ python3_tmpdir }}" state: directory mode: 0700 changed_when: false # tmpdir role removes directory automatically - name: Download pyenv installer get_url: url: https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer dest: "{{ python3_tmpdir }}" changed_when: false # temporary directory is removed when play ends - name: Run pyenv installer command: "bash pyenv-installer" args: chdir: "{{ python3_tmpdir }}" creates: "{{ ansible_user_dir }}/.pyenv" - name: Update login file blockinfile: path: "{{ python3_bashrc }}" create: true block: | export PATH="{{ ansible_user_dir }}/.pyenv/bin:$PATH" eval "$(pyenv init -)" eval "$(pyenv virtualenv-init -)" mode: 0644 - name: Update pyenv command: pyenv update - name: Install Python block: - name: Install Python command: "pyenv install 3.8.5" args: creates: "{{ ansible_user_dir }}/.pyenv/versions/3.8.5" - name: Execute pyenv rehash command: "pyenv rehash" - name: Define python3 command set_fact: # can't rely on changes to $PATH yet python3_command: "{{ ansible_user_dir }}/.pyenv/shims/{{ python3_command }}"

  • ansible-python3-role

    Ansible role for installing Python 3.

  • I followed this: https://github.com/mdklatt/ansible-python3-role/tree/daa862aaf4e44b96c50131a9b0686dc473a3595c

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • CPython

    The Python programming language

  • apt show python3 -a Package: python3 Version: 3.6.7-1~18.04 Priority: important Section: python Source: python3-defaults Origin: Ubuntu Maintainer: Ubuntu Developers Original-Maintainer: Matthias Klose Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 191 kB Provides: python3-profiler Pre-Depends: python3-minimal (= 3.6.7-1~18.04) Depends: python3.6 (>= 3.6.7-1~), libpython3-stdlib (= 3.6.7-1~18.04) Suggests: python3-doc (>= 3.6.7-1~18.04), python3-tk (>= 3.6.7-1~), python3-venv (>= 3.6.7-1~18.04) Replaces: python3-minimal (<< 3.1.2-2) Homepage: https://www.python.org/ Task: minimal, ubuntu-core Cnf-Extra-Commands: python Cnf-Priority-Bonus: 5 Supported: 5y Download-Size: 47.2 kB APT-Manual-Installed: no APT-Sources: http://eu-west-2.ec2.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages Description: interactive high-level object-oriented language (default python3 version) Python, the high-level, interactive object oriented language, includes an extensive class library with lots of goodies for network programming, system administration, sounds and graphics. . This package is a dependency package, which depends on Debian's default Python 3 version (currently v3.6). Package: python3 Version: 3.6.5-3 Priority: important Section: python Source: python3-defaults Origin: Ubuntu Maintainer: Ubuntu Developers Original-Maintainer: Matthias Klose Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 75.8 kB Provides: python3-profiler Pre-Depends: python3-minimal (= 3.6.5-3) Depends: python3.6 (>= 3.6.5-2~), libpython3-stdlib (= 3.6.5-3) Suggests: python3-doc (>= 3.6.5-3), python3-tk (>= 3.6.5-2~), python3-venv (>= 3.6.5-3) Replaces: python3-minimal (<< 3.1.2-2) Homepage: http://www.python.org/ Task: minimal, ubuntu-core Cnf-Extra-Commands: python Cnf-Priority-Bonus: 5 Supported: 5y Download-Size: 10.2 kB APT-Sources: http://eu-west-2.ec2.archive.ubuntu.com/ubuntu bionic/main amd64 Packages Description: interactive high-level object-oriented language (default python3 version) Python, the high-level, interactive object oriented language, includes an extensive class library with lots of goodies for network programming, system administration, sounds and graphics. . This package is a dependency package, which depends on Debian's default Python 3 version (currently v3.6).

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts