Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of installing pyenv under Linux

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Precondition

Git needs to be installed

Installation steps

1. Clone pyenv from a remote repository

Clone pyenv using the following command:

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

two。 Configure environment variables

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

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

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

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

3. Use environment variables

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

Source / .bash_profile

At this point, the pyenv installation is complete.

You can view the installed version of pyenv using the following command:

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

Summary

The above is the method of installing pyenv under Linux introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave a message for me, and the editor will reply you in time. Thank you very much for your support to the website!

If you think this article is helpful to you, you are welcome to reprint it, please indicate the source, thank you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report