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

Basic structure of HTML documents (basic knowledge of making web pages)

HTML operation principle: 1. Local operation: ope...

JavaScript to achieve mouse drag effect

This article shares the specific code of JavaScri...

js realizes 3D sound effects through audioContext

This article shares the specific code of js to ac...

Sharing tips on using Frameset to center the widescreen

Copy code The code is as follows: <frameset co...

Example of building a Jenkins service with Docker

Pull the image root@EricZhou-MateBookProX: docker...

Implementing form submission without refreshing the page based on HTML

Using ajax to implement form submission without re...

52 SQL statements to teach you performance optimization

1. To optimize the query, try to avoid full table...

Install nvidia graphics driver under Ubuntu (simple installation method)

Install the nvidia graphics card driver under Ubu...

MySql index improves query speed common methods code examples

Use indexes to speed up queries 1. Introduction I...

How to insert video into HTML and make it compatible with all browsers

There are two most commonly used methods to insert...

CentOS 6-7 yum installation method of PHP (recommended)

1. Check the currently installed PHP packages yum...