Python Env
简介:
记录 CentOS 6.x Python 环境的安装步骤。
一、安装依赖包
shell > yum -y install epel-release
shell > yum -y install gcc gcc-c++ wget readline-devel zlib-devel openssl-devel sqlite-devel shell > python -V
Python 2.6.
一、安装 Python 2.7
shell > cd /usr/local/src; wget -c https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tgz
shell > tar zxf Python-2.7..tgz
sehll > cd Python-2.7.
shell > ./configure && make && make install shell > python2 -V
Python 2.7.
二、安装 Python 3.5
shell > cd /usr/local/src; wget -c https://www.python.org/ftp/python/3.5.4/Python-3.5.4.tgz
shell > tar zxf Python-3.5..tgz
shell > cd Python-3.5.
shell > ./configure && make && make install shell > python3 -V
Python 3.5.
三、安装 Virtualenv
shell > pip3 install virtualenv
四、创建不同的 Python 环境
1、Python 2.x
shell > virtualenv --no-site-packages -p python2 py2.x
shell > source py2.x/bin/activate (py2.x) shell > python -V
Python 2.7. (py2.x) shell > pip install ipython (py2.x) shell > ipython
Python 2.7. (default, Aug , ::)
Type "copyright", "credits" or "license" for more information. IPython 5.4. -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details. In []: (py2.x) shell > deactivate
# 创建了一个 python2 的虚拟环境 名称为 py2.x,之后激活这个虚拟环境
# 可以看到默认的 python 版本已经不是原来的 2.6.6
# 使用 pip 安装 ipython 软件包
# ipython 调用的 python 版本也是 2.7.13
# 退出虚拟环境
2、Python 3.x
shell > virtualenv --no-site-packages -p python3 py3.x
shell > source py3.x/bin/activate (py3.x) shell > python -V
Python 3.5. (py3.x) shell > pip install ipython (py3.x) shell > ipython
Python 3.5. (default, Aug , ::)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.1. -- An enhanced Interactive Python. Type '?' for help. In []: (py3.x) shell > deactivate
# End
Python Env的更多相关文章
- Error: Can't find Python executable, you can set the PYTHON env variable.
该错误解决方案. NodeJS安装Npm包时出现错误: npm WARN prefer global node-gyp@3.4.0 should be installed with -g > s ...
- 56.ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
Node.js 在安装模块的时候报错,缺少python环境. ERR! configure error gyp ERR! stack Error: Can't find Python executab ...
- 解决Error: Can't find Python executable "python", you can set the PYTHON env variable
在执行 yarn start时遇到问题, 最后一行提示 Run `npm rebuild node-sass` to download the binding for your current env ...
- VsCode/Pycharm配合python env 使用
前言 用惯了vscode,这几天试了一下pycharm,还是回来了. pycharm一个好处就是python env 环境支持的比较好, vscode虽然也支持但是要改一些东西 env的使用查看我的上 ...
- 成功解决:Can‘t find Python executable “python“, you can set the PYTHON env variable.
今天跑公司新项目的时候.运行前端vue.报了一个关于python的错误.就离谱 1.问题报错全部代码 actual version of core-js. npm ERR! code 1 npm ER ...
- beat your own python env
1,进入根目录,修改.bashrc,增加一个PATH目录 例如:alias cjtf='export PATH=/home/www/xxx/python_env:$PATH' 如果个人的机器的就不用a ...
- Python env使用(virtualenv)
前言 Python 的 virualenv 模块闻名已久,乘着有点时间,学习一下 变更记录 # 19.3.26 创建文章 # 19.3.27 完善文章 正文 安装 pip install virt ...
- ERROR: CAN'T FIND PYTHON EXECUTABLE "PYTHON", YOU CAN SET THE PYTHON ENV VARIABLE.解决办法
错误原因:Node.js 在安装模块的时候报错,缺少python环境. 解决办法: 第一种方式: 安装Python及环境变量配置 一定要安装python2.7的版本 环境变量安装可以参考:http:/ ...
- python 01
注意Python 是大小写敏感的,即print 与Print 不一样 推荐编辑器 vim & sublime 如何运行 #!/usr/bin/python#Filename: hellowor ...
随机推荐
- SQL语言:DDL/DML/DQL/DCL
SQL (Structure Query Language)语言是数据库的核心语言. SQL 的发展是从1974年开始的,其发展过程如下: 1974年-----由Boyce和Chamberlin提出, ...
- websocket小体验
http://www.cnblogs.com/GoodHelper/p/7078381.html https://segmentfault.com/a/1190000012084213
- VS2010程序调试
http://blog.csdn.net/kingzone_2008/article/details/8133048 调试初识及实例.
- Java初学几个程序背诵
1.Hello world class first { public static void main(String[] args){ System.out.println("Hello w ...
- 【Spring学习笔记-MVC-7】Spring MVC模型对象-模型属性讲解
作者:ssslinppp 来自为知笔记(Wiz) 附件列表 处理模型数据.png
- java发送http请求,内容为xml格式&&传统URI类请求
import java.io.BufferedInputStream; import java.io.BufferedReader; import java.io.ByteArrayOutputStr ...
- [UE4]蓝图函数库小结
蓝图函数库的功能非常强劲,如果在项目中使用的话有时能达到事半功倍的效果. 蓝图函数库,Blueprint Function Library.可以非常方便的将代码中的函数暴露给所有的蓝图使用,同时也提供 ...
- java操作hbase1.3.1的增删改查
我的eclipse程序在windows7机器上,hbase在linux机器上 1,首先在C:\Windows\System32\drivers\etc下面的HOSTS文件,加上linux 集群 2.直 ...
- spark1.0属性配置以及spark-submit简单使用
在spark1.0中属性支持三种配置方式: 1.代码 在代码中构造SparkConf时指定master.appname或者key-value等 val conf = new SparkConf(); ...
- 安装HBase(0.9)数据库
基本知识: 1.hbase是一种基于列存储的数据库,也就是说它的一列的数据是存储在一个文件里面的,而传统的数据库存储都是一个文件存储多个行,这些行有不同的列,这些列的数据类型 不同. 2.基于HDFS ...