Django学习
简明 Django
开始第一个django项目
DJ 基本设置
test django1.4 on centos6
quick to start django app
django app login system
boot django with uwsgi tool
nginx proxy django site from uwsgi
Python django 环境
python pyenv multi env
python install 2.7 on centos 6
windows support python 2.7
python3/pip3 on centos 6
Python 3 pip3 SSL未配置
本文档使用 MrDoc 发布
-
+
首页
python install 2.7 on centos 6
centos6-install-python2.7 # python install 2.7 on centos 6 --- Linux系统默认的python版本号是2.6,为了让windows/osx/centos多平台都保持同一版本号,我们决定升级python到2.7! ## 一、 先查看你的系统是什么版本号。如我的系统是 Centos6.5 64Bit。 [root@python ~]# uname -a Linux python 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux 显示为python2.6 设备为centos6.5 64x,在这之前你可能需要检查一下 gcc~~之类的有没有安装! # yum groupinstall "Development tools" # yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel # pip install mysql-python ## 二、 安装python环境 Python下载地址: # mkdir /usr/local/python27 # wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz # wget https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tgz # tar -zxvf Python-2.7.10.tgz # cd Python-2.7.10 # ./configure prefix=/usr/local/python27/ # make && make install 安装完成,但是启动时需要指定正确的路径,非常不方便!这里我们给定它系统路径。 # ln -s /usr/local/python27/bin/python2.7 /usr/local/bin/python27 ## 三、检查一下是版本是否正确。有否升级到2.7 # python27 -V Python 2.7.10 ## 四、测试 # python27 Python 2.7.10 (default, Mar 13 2016, 16:35:05) [GCC 4.4.7 20120313 (Red Hat 4.4.7-16)] on linux2 Type "help", "copyright", "credits" or "license" for more information. #>>> help() __Welcome to Python 2.7! This is the online help utility. If this is your first time using Python, you should definitely check out the tutorial on the Internet at http://docs.python.org/2.7/tutorial/. Enter the name of any module, keyword, or topic to get help on writing Python programs and using Python modules. To quit this help utility and return to the interpreter, just type "quit". To get a list of available modules, keywords, or topics, type "modules", "keywords", or "topics". Each module also comes with a one-line summary of what it does; to list the modules whose summaries contain a given word such as "spam", type "modules spam". # ln -s /usr/local/python27/bin/python2.7 /usr/local/bin/python 编辑/usr/bin/yum,将第一行的#!/usr/bin/python修改成#!/usr/bin/python2.6.6 # wget https://bootstrap.pypa.io/get-pip.py # python get-pip.py # whereis pip # ln -s /usr/local/bin/pip2.7 /usr/bin/pip # pip install psutil requests paramiko # yum groupinstall "Development Tools" ```python 40 yum install gcc -y 41 yum install gcc-c++ -y 47 cd /usr/local/src/ 49 wget https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz 51 tar -zxvf Python-2.7.8.tgz 52 cd Python-2.7.8 54 mkdir -p /usr/local/python27 55 ./configure --prefix=/usr/local/python27/ 56 make 57 make install 58 cd /usr/local/python27/ 63 python -V 65 ./python2.7 -V 71 cd include/ 74 cd python2.7/ 77 cp -a ./* /usr/local/include/ 78 cd /usr/bin/ 79 ll python 81 mv python python26 82 ln -s /usr/local/python27/bin/python2.7 python 84 ll python* 85 python -V 88 ll python8 90 vim /usr/bin/yum 91 yum makecache ```
Bobby
2021年12月21日 23:36
分享文档
收藏文档
阅读
143
上一篇
下一篇
微信扫一扫
复制链接
手机扫一扫进行分享
复制链接
关于 MrDoc
觅思文档MrDoc
是
州的先生
开发并开源的在线文档系统,其适合作为个人和小型团队的云笔记、文档和知识库管理工具。
如果觅思文档给你或你的团队带来了帮助,欢迎对作者进行一些打赏捐助,这将有力支持作者持续投入精力更新和维护觅思文档,感谢你的捐助!
>>>捐助鸣谢列表
微信
支付宝
QQ
PayPal
Markdown文件
分享
链接
类型
密码
更新密码