Ubuntu安装pyenv实现多版本控制
Ubuntu安装pyenv实现python多版本控制
git clone git://github.com/yyuu/pyenv.git ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
exec $SHELL -l
查看可安装的版本
pyenv install --list
比如安装python2.7.14和python3.6.3版本
pyenv install 2.7.14 -v
pyenv install 3.6.3 -v
设置其为全局python
pyenv global 2.7.14 3.6.3
查看是否安装成功
ltq@lab:~$ python
Python 2.7.14 (default, Nov 25 2017, 23:00:16)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
ltq@lab:~$ python3
Python 3.6.3 (default, Nov 27 2017, 22:54:07)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
另外,每当你增删了 Python 版本或带有可执行文件的包(如 pip)以后,都应该执行一次本
pyenv rehash
更多命令参考pyenv-github,或者
ltq@lab:~$ pyenv -h
Usage: pyenv <command> [<args>]
Some useful pyenv commands are:
commands List all available pyenv commands
local Set or show the local application-specific Python version
global Set or show the global Python version
shell Set or show the shell-specific Python version
install Install a Python version using python-build
uninstall Uninstall a specific Python version
rehash Rehash pyenv shims (run this after installing executables)
version Show the current Python version and its origin
versions List all Python versions available to pyenv
which Display the full path to an executable
whence List all Python versions that contain the given executable
See `pyenv help <command>' for information on a specific command.
For full documentation, see: https://github.com/pyenv/pyenv#readme
Ubuntu安装pyenv实现多版本控制的更多相关文章
- Ubuntu安装pyenv实现python多版本控制
Ubuntu安装pyenv实现python多版本控制 git clone git://github.com/yyuu/pyenv.git ~/.pyenv echo 'export PYENV_ROO ...
- ubuntu安装pyenv
安装依赖包 bash {.line-numbers} sudo apt-get update sudo apt-get install build-essential python-dev pytho ...
- Ubuntu下安装Pyenv不成功,求指教
虚拟机:VMware12.0 操作系统:Ubuntu16.04 LTS (新安装系统) 已经按照网上的步骤: 1.安装git: $sudo apt-get install git 2.安装依赖包: $ ...
- 在Ubuntu上安装pyenv
因为找到一个域名枚举的脚本使用Python3编写的,而我一直习惯的是使用Python2.7,在自己的Windows7上再安装个Python怕混了,于是想着在VPS上装个Python的版本管理工具,也方 ...
- Ubuntu 18.04安装 pyenv、pyenv-virtualenv、virtualenv、Numpy、SciPy、Pillow、Matplotlib
1.目前Python版本管理工具有很多,pyenv是比较好用的一款,安装如下: 输入: git clone https://github.com/pyenv/pyenv.git ~/.pyenv ec ...
- Ubuntu系统安装Pyenv
安装Pyenv curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | ...
- Mac下安装pyenv
mac 用virtualenv安装py3.6的虚拟环境报错(virtualenv -p /usr/bin/python3 env36), 解决的话需要安装zlib包, 然后去掉configure配置里 ...
- Ubuntu安装spyder并添加快捷方式
Ubuntu安装spyder并添加快捷方式 之前通过 sudo apt install spyder sudo apt install spyder3 安装spyder,但是这样有个坏处,编译器只能用 ...
- [PY3]——环境配置(1)——pyenv | pip | ipython | jupyter(含安装pyenv环境shell脚本)
1.关于pyenv (1)pyenv是一个开源的.shell脚本编写的工具:Simple Python version management (2)为什么使用pyenv:当多个项目同时在开发与维护时, ...
随机推荐
- PHP 404页面/如何设置404页面/URL静态化/URL伪静态化
php中如何设置404页面及其他错误页面 首先在项目根目录下新建文件,文件名为" .htaccess " 在该文件中写入一下配置项: ErrorDocument 404 /404. ...
- IT 圈里有哪些经常被读错的词?
原文链接:IT 圈里有哪些经常被读错的词? ()标相应英文单词[]标音标 =====公司/产品名===== Youtube (You-tube [tju:b]) 念 优tiu啵 不念 优吐毙Skype ...
- Hibernate的一对多查询及去掉重复的对象distinct
问:sql 中 select * from A left join B on A.id=B.id where A.id=? 如果在Hibernate 中 用HQL 怎么表达呢 ?答:from A le ...
- SpringMVC + Spring + Mybatis+ Redis +shiro以及MyBatis学习
SpringMVC + Spring + Mybatis+ Redis +shiro http://www.sojson.com/shiro MyBatis简介与配置MyBatis+Spring+My ...
- 【ASP.NET MVC 学习笔记】- 06 在MVC中使用Ninject
本文参考:http://www.cnblogs.com/willick/p/3299077.html 1.在ASP.NET MVC中一个客户端请求是在特定的Controller的Action中处理的. ...
- [BC]Four Inages Strategy(三维空间判断正方形)
题目连接 :http://bestcoder.hdu.edu.cn/contests/contest_showproblem.php?cid=577&pid=1001 题目大意:在三维空间中, ...
- Android 圆角的效果实现
Android 自定义ImageView实现圆角图片昨天给学生布置作业,写微信首页,也就是聊天的界面,listView里的item中联系人的头像是圆角的,图形界面如下: 那么我就仔细研究了圆角的具体实 ...
- 实现一个单隐层神经网络python
看过首席科学家NG的深度学习公开课很久了,一直没有时间做课后编程题,做完想把思路总结下来,仅仅记录编程主线. 一 引用工具包 import numpy as np import matplotlib. ...
- 微信小程序---wx.request(OBJECT)
详情 :https://mp.weixin.qq.com/debug/wxadoc/dev/api/network-request.html#wxrequestobject 1: 首先要配置你的域名 ...
- Java项目打包方式分析
[TOC] 概述 在项目实践过程中,有个需求需要做一个引擎能执行指定jar包的指定main方法. 起初我们以一个简单的spring-boot项目进行测试,使用spring-boot-maven-plu ...