Ubuntu安装Python版本管理工具pyenv
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了Ubuntu安装Python版本管理工具pyenv,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2201字,纯文字阅读大概需要4分钟。
内容图文
gyf@gyf-VirtualBox:~$ git clone https://github.com/yyuu/pyenv.git ~/.pyenv
Cloning into '/home/gyf/.pyenv'...
remote: Enumerating objects: 17608, done.
remote: Total 17608 (delta 0), reused 0 (delta 0), pack-reused 17608
Receiving objects: 100% (17608/17608), 3.47 MiB | 15.00 KiB/s, done.
Resolving deltas: 100% (11960/11960), done.
gyf@gyf-VirtualBox:~$ #
gyf@gyf-VirtualBox:~$ sudo echo 'export PYENV_ROOT="$HOME/.pyenv"'>>~/.bash_profile
gyf@gyf-VirtualBox:~$ sudo echo 'export PATH="$PYENV_ROOT/bin:$PATH"'>>~/.bash_profile
gyf@gyf-VirtualBox:~$ sudo echo 'eval "$(pyenv init -)"'>>~/.bash_profile
gyf@gyf-VirtualBox:~$ source ~/.bash_profile
gyf@gyf-VirtualBox:~$ pyenv --help #这句指令可以验证是否安装成功,出现下面的提示就OK了。
Usage: pyenv <command> [<args>]
Some useful pyenv commands are:
commands List all available pyenv commands
exec Run an executable with the selected Python version
global Set or show the global Python version
help Display help for a command
hooks List hook scripts for a given pyenv command
init Configure the shell environment for pyenv
install Install a Python version using python-build
local Set or show the local application-specific Python version
prefix Display prefix for a Python version
rehash Rehash pyenv shims (run this after installing executables)
root Display the root directory where versions and shims are kept
shell Set or show the shell-specific Python version
shims List existing pyenv shims
uninstall Uninstall a specific Python version
version Show the current Python version and its origin
--version Display the version of pyenv
version-file Detect the file that sets the current pyenv version
version-name Show the current Python version
version-origin Explain how the current Python version is set
versions List all Python versions available to pyenv
whence List all Python versions that contain the given executable
which Display the full path to an executable
See `pyenv help <command>' for information on a specific command.
For full documentation, see: https://github.com/pyenv/pyenv#readme
gyf@gyf-VirtualBox:~$
内容总结
以上是互联网集市为您收集整理的Ubuntu安装Python版本管理工具pyenv全部内容,希望文章能够帮你解决Ubuntu安装Python版本管理工具pyenv所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。