Python安装
来源:互联网 发布:淘宝助理销售属性空白 编辑:程序博客网 时间:2024/05/20 23:05
1安装需要的包
yum groupinstall "Development tools"yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel2下载安装Python 2.7.10
--下载cd /optwget --no-check-certificate https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tar.xztar xf Python-2.7.10.tar.xzcd Python-2.7.10--编译安装./configuremake make altinstall3将Python命令指向Python 2.7.10
[root@fyl bin]# whereis pythonpython: /usr/bin/python /usr/bin/python2.6 /usr/lib/python2.6 /usr/lib64/python2.6 /usr/local/bin/python2.7 /usr/local/bin/python2.7-config /usr/local/lib/python2.7 /usr/include/python2.6 /usr/share/man/man1/python.1.gz[root@fyl bin]# rm /usr/bin/python[root@fyl bin]# ln -s /usr/local/bin/python2.7 /usr/bin/python[root@fyl bin]# pythonPython 2.7.10 (default, Sep 12 2015, 13:12:13) [GCC 4.4.7 20120313 (Red Hat 4.4.7-11)] on linux2Type "help", "copyright", "credits" or "license" for more information.>>> >>> exit()4简单语法
[root@fyl Python]# more hello.py #!/usr/bin/pythonprint "hello woord!"[root@fyl Python]# python hello.py hello woord!
0 0
- 安装Python
- Python 安装
- python安装
- 安装Python
- python安装
- Python安装
- 安装Python
- python安装
- 安装Python
- 安装Python
- python安装
- python安装
- 安装Python
- Python安装
- python安装
- python安装
- python安装
- 安装Python
- 哪款Linux发行版是你的最佳选择呢?
- C++虚析构函数、纯虚析构函数
- 全排列
- lintcode-单词搜索-123
- 在Spring、Hibernate中使用Ehcache缓存--Ehcache 整合Spring 使用页面、对象缓存
- Python安装
- Populating Next Right Pointers in Each Node II
- 关于超宽屏21:9显示器不能调节正确分辨率的解决办法
- HTTP协议-Web基础-1
- javascript 判断一个点是否在多边形内(向量的使用)
- POJ 1252 Euro Efficiency【完全背包正负】
- GWXZ摸底考模拟赛
- 文章标题
- viewpager