How to install pyenv under Linux

How to install pyenv under Linux

Prerequisites

Need to install git

Installation Steps

1. Clone pyenv from the remote repository

Clone pyenv using the command below:

git clone https://github.com/yyuu/pyenv.git ~/.pyenv

2. Configure environment variables

Use the following three commands in sequence to configure the environment variables:

echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile

Or go directly into the file and add at the end:

vim ~/.bash_profile
#pyenv
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"

3. Using environment variables

Use the source command to re-execute the configuration file modified in the previous step:

source ~/.bash_profile

At this point, pyenv is installed.

You can use the following command to view the installed pyenv version:

[root@server1 local]# pyenv -v
pyenv 1.2.13-14-gecd67c8

Summarize

The above is the method of installing pyenv under Linux introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • Ubuntu 18.04 installs pyenv, pyenv-virtualenv, virtualenv, Numpy, SciPy, Pillow, Matplotlib
  • Install pyenv and virtualenv to manage multiple versions and projects of Python
  • Steps to install Pyenv under Deepin
  • Tutorial on installation and use of pyenv in Mac

<<:  Vue3 draggable left and right panel split component implementation

>>:  Detailed installation and uninstallation tutorial for MySQL 8.0.12

Recommend

CSS code to achieve 10 modern layouts

Preface I watched web.dev's 2020 three-day li...

Detailed explanation of the principle of Vue monitoring data

Table of contents 1. Introduction II. Monitoring ...

Example of implementing GitHub's third-party authorization method in Vue

Table of contents Creating OAuth Apps Get the cod...

Summary of common functions of PostgreSQL regular expressions

Summary of common functions of PostgreSQL regular...

Detailed tutorial for downloading and installing mysql8.0.21

Official website address: https://www.mysql.com/ ...

Several ways to implement image adaptive container with CSS (summary)

There is often a scenario where the image needs t...

The latest version of MySQL5.7.19 decompression version installation guide

MySQL version: MySQL Community Edition (GPL) ----...

Summary of knowledge points about covering index in MySQL

If an index contains (or covers) the values ​​of ...

MySQL 8.0 installation tutorial under Linux

This article introduces how to install MySQL 8.0 ...

W3C Tutorial (13): W3C WSDL Activities

Web Services are concerned with application-to-ap...

CSS stacking and z-index example code

Cascading and Cascading Levels HTML elements are ...