GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - asdf-community/asdf-python: Python plugin for the asdf version manager [maintainer=@danhper]

BranchesTags
Open more actions menu

Latest commit

 

History

92 Commits
92 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
bin
bin
 
 
shims
shims
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
renovate.json
renovate.json
 
 

Repository files navigation

asdf-python

Build Status

Python plugin for asdf version manager

Install

asdf plugin add python https://github.com/asdf-community/asdf-python.git

For pre-0.16.0 asdf versions:

asdf plugin-add python https://github.com/asdf-community/asdf-python.git

Install with --patch

Enable to fix macOS 11 issues

You can use environment variable ASDF_PYTHON_PATCH_URL to install with --patch like that:

export ASDF_PYTHON_PATCH_URL="https://github.com/python/cpython/commit/8ea6353.patch?full_index=1"
asdf install python 3.6.12

or use environment variable ASDF_PYTHON_PATCHES_DIRECTORY.

Use

Check asdf readme for instructions on how to install & manage versions of Python. Please make sure you have the required system dependencies installed before trying to install Python.

Under the hood, asdf-python uses pyenv python-build to build and install Python. Check its README for more information about build options and the common build problems wiki page for any issues encountered during installation of Python. You may also want to check Python's official setup building section for latest version dependencies.

Ubuntu

For Ubuntu 20 and 22

sudo apt-get update; sudo apt-get install 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

then

asdf install python latest

Using multiple versions of Python

A common request for Python is being able to use the python2 and python3 commands without needing to switch version. This can be achieved by setting multiple versions of Python, for example with

asdf set -u python 3.6.2 2.7.13

For pre-0.16.0 asdf versions:

asdf global python 3.6.2 2.7.13

Executables in the first version will take priority over the executables in the next one. Note that you can use an arbitrary number over versions, if needed. With the above example, python will therefore use the python executable found in version 3.6.2. However, as the python2 does not exist in Python 3.6.2, python2 will use the python2 executable found in version 2.7.13.

python -V
Python 3.6.2

python3 -V
Python 3.6.2

python2 -V
Python 2.7.13

Pip installed modules and binaries

If you use pip to install a module like ipython that has binaries, you will need to run asdf reshim python for the binary to be in your path.

Default Python packages

asdf-python can automatically install a default set of Python packages with pip right after installing a Python version. To enable this feature, provide a $HOME/.default-python-packages file that lists one package per line, for example:

ansible
pipenv

You can specify a non-default location of this file by setting a ASDF_PYTHON_DEFAULT_PACKAGES_FILE variable.

About

Python plugin for the asdf version manager [maintainer=@danhper]

github.com/asdf-vm/asdf

Topics

asdfasdf-plugin

Resources

Readme
MIT license

Security policy

Security policy
Activity
Custom properties

Stars

731 stars

Watchers

4 watching

Forks

64 forks
Report repository

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.