This article is a mirror article of machine translation, please click here to jump to the original article.

View: 1380|Reply: 2

[Source] Linux uses pyenv to install the Python environment

[Copy link]
Posted on 2025-2-11 14:14:41 | | | |
Requirements: The server needs to execute some python scripts regularly, so it is necessary to install a python environment on the server, taking Debian 11 system as an example, using pyenv to install python.

Simple Python version control: pyenv, address:The hyperlink login is visible.

Install dependencies

First, install the following dependencies on the server with the following command:

Reference:The hyperlink login is visible.

Install pyenv

Automatically install the program and execute the following commands directly:

Configure the environment variable to write the installation path~/.bashrc, the command is as follows:

Restart the shell terminal with the following command:

Common commands are as follows:



Switch between Python versions

Note: If the download of Python-3.13.2.tar.xz is slow, you can download it locally and upload it to~/.pyenv/cache/Table of contents below! Address:The hyperlink login is visible.





Previous:Python embed packages install packages using pip
Next:.NET/C# calls the Python environment to execute .py scripts
 Landlord| Posted on 2025-2-11 14:49:40 |
List all available versions of Python


The command is versions,There is an s behind it!!!




 Landlord| Posted on 2025-3-5 10:40:08 |
uv a blazing-fast Python package and project manager written in Rust. :https://docs.astral.sh/uv/
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com