如何在没有 root 权限的情况下安装 python 3.x 和 2.y [英] How to install python 3.x alongside with 2.y without root privileges

查看:54
本文介绍了如何在没有 root 权限的情况下安装 python 3.x 和 2.y的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一台没有 root 权限的共享机器上工作,但安装了 Python 2.y,但我想同时拥有 Python 的两种风格,我也想调用 Python 2.y 只需键入 python(像往常一样)) 并且要调用 Python 3.x,请键入 python3.我知道这是可能的,因为在我的主要设备中(whit root 访问权限和 sudo 的魔力)我可以选择"使用哪个.

I'm working in a shared machine with no root privileges, but Python 2.y installed, but I would like to have both flavors of Python, also I would like to call Python 2.y just typing python (as usual) and for calling Python 3.x, type python3. I understand that this is possible because in my main equipment (whit root access, and the magic of sudo) I can "select" which one to use.

推荐答案

你可以安装 pyenvpyenv installer script 然后运行 ​​pyenv install 2.7.14pyenv 安装 3.6.3.

You can install pyenv with the pyenv installer script and then run pyenv install 2.7.14 and pyenv install 3.6.3.

更多文档在这里

这篇关于如何在没有 root 权限的情况下安装 python 3.x 和 2.y的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆