python2.7.13环境搭建
查看当前系统中的 Python 版本,可以看到实验室的这台服务器已经安装了 Python 2.6.6
python --version
检查 CentOS 版本,我们可以看到这台服务器的 CentOS的版本是 CentOS release 6.8
cat /etc/redhat-release
yum 源中没有新版 Python ,我们到官网中下载 Python 2.7.13配置 Python
更新系统默认 Python 版本
#!/usr/bin/python2.
import sys
try:
import yum
except ImportError:
print >> sys.stderr, """\nThere was a problem importing one of the Python modules
required to run yum. The error leading to this problem was: %s Please install a package which provides this module, or
verify that the module is installed correctly. It's possible that the above module doesn't match the
current version of Python, which is:
%s If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq """ % (sys.exc_value, sys.version)
sys.exit() sys.path.insert(, '/usr/share/yum-cli')
try:
import yummain
yummain.user_main(sys.argv[:], exit_code=True)
except KeyboardInterrupt, e:
print >> sys.stderr, " Exiting on user cancel."
sys.exit()
再查看 Python 版本,现在我们看到的已经是最新版了
python --version
为新版 Python 安装一些工具
为新版 Python 安装 pip
#!/usr/bin/python print "Hello, World!";
执行 python hello.py
python2.7.13环境搭建的更多相关文章
- python2.7+appium环境搭建
实现android自动化 目录 1.环境准备.安装包准备 2.安装 3.验证环境搭建成功 1.环境准备.安装包准备 第一步:环境准备: java环境 python环境 第二步:准备安装包 Node.j ...
- CUDA9.0+tensorflow-gpu1.8.0+Python2.7服务器环境搭建经验
最近在实验室的服务器上搭建Tensorflow,CUDA是默认的9.0,管理员已经装好了,同时环境变量都已经配好. 直接用Anaconda创建的虚拟环境,使用pip install tensorflo ...
- Mac OS X上IntelliJ IDEA 13与Tomcat 8的Java Web开发环境搭建
这标题实在有点拗口,不知道怎么写好,但看了标题也就明白文本的内容.最近几天在折腾这些玩意儿,所以写写总结.除了环境搭建,本文还是一篇入门级的上手教程. 去下载一些东西 JDK安装 Tomcat安装 T ...
- py-faster-rcnn(running the demo): ubuntu14.04+caffe+cuda7.5+cudnn5.1.3+python2.7环境搭建记录
第一次写博客,以此纪念这几天安装caffe,跑faster-rcnn的血泪史.在此特别感谢网络各路大神,来自全球各地,让我能从中汲取营养,吸取经验,总结规律. faster-rcnn分为matlab版 ...
- Unix/Linux环境C编程入门教程(13) 开发环境搭建VMware软件安装
VMware(中文名威睿",纽约证券交易所"代码:VMW) 虚拟机软件,是全球桌面到数据中心虚拟化解决方案的领导厂商.全球不同规模的客户依靠VMware来降低成本和运营费用.确保业 ...
- opencv-python:win7下,搭建python2.7.5环境,配置opencv3.1.0准备开工-OpenCV步步精深
我的个人博客:点这里 搭建python2.7.5环境 下载python2.7.5 64位:https://www.python.org/ftp/python/2.7.5/python-2.7.5.am ...
- 《k8s-1.13版本源码分析》-测试环境搭建(k8s-1.13版本单节点环境搭建)
本文原始地址(gitbook格式):https://farmer-hutao.github.io/k8s-source-code-analysis/prepare/debug-environment. ...
- 痞子衡嵌入式:语音处理工具Jays-PySPEECH诞生记(1)- 环境搭建(Python2.7.14 + PyAudio0.2.11 + Matplotlib2.2.3 + SpeechRecognition3.8.1 + pyttsx3 2.7)
大家好,我是痞子衡,是正经搞技术的痞子.今天痞子衡给大家介绍的是语音处理工具Jays-PySPEECH诞生之环境搭建. 在写Jays-PySPEECH时需要先搭好开发环境,下表列出了开发过程中会用到的 ...
- 痞子衡嵌入式:串口调试工具Jays-PyCOM诞生记(1)- 环境搭建(Python2.7.14 + pySerial3.4 + wxPython4.0.3)
大家好,我是痞子衡,是正经搞技术的痞子.今天痞子衡给大家介绍的是串口调试工具Jays-PyCOM诞生之环境搭建. 在写Jays-PyCOM时需要先搭好开发和调试环境,下表列出了开发过程中会用到的所有软 ...
随机推荐
- angular学习笔记(五)-阶乘计算实例(1)
<!DOCTYPE html> <html ng-app> <head> <title>2.3.2计算阶乘实例1</title> <m ...
- FZU Problem 2105 Digits Count
Problem Description Given N integers A={A[0],A[1],...,A[N-1]}. Here we have some operations: Operati ...
- centos启动zookeeper
切换到zookeeper的bin目录下,执行 ./zkServer.sh start
- warning: assignment from incompatible pointer type [enabled by default]
kernel 编译产生这个警告的原因是 不兼容指针类型的赋值 这个原因很有可能是因为返回值和正在接受这个指针类型名不相同. // vim arch/arm/mach-omap2/usb-host.c ...
- dom4j解析带命名空间的xml文件
文件内容如下 <ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd=& ...
- oracle数据库表空间的创建与使用
以下操作请使用sys系统账号操作! 1. 查询物理存储的位置 SELECT tablespace_name, file_id, file_name, round(bytes / (1024 * 10 ...
- linux后台运行jar程序
Linux 运行jar包命令如下: 方式一:java -jar XXX.jar特点:当前ssh窗口被锁定,可按CTRL + C打断程序运行,或直接关闭窗口,程序退出那如何让窗口不锁定? 方式二java ...
- [Javascript]右侧悬浮框
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- sqlserver查询最接近的记录
select top 1 SEX,ACTIVE ,HEIGHT,WEIGHT,HOT,CARBON,PROTEIN,FAT,sodium from standard where sex='0'and ...
- centos 部署 SparkR
---恢复内容开始--- 环境配置—— 操作系统:CentOS 6.5 JDK版本:1.7.0_67 Hadoop集群版本:CDH 5.3.0 安装过程—— 1.(1)安装R yum install ...