1、查看python的版本$ cd /usr/bin/$ ls python* $ ls -al python* //查看依赖关系2、如果版本不合适可以卸载python再重新安装# rpm -qa|grep python|xargs rpm -e --allmatches --nodeps # 卸载python# wget htt...
1、查看python的版本
$ cd /usr/bin/
$ ls python*
$ ls -al python* //查看依赖关系
2、如果版本不合适可以卸载python再重新安装
# rpm -qa|grep python|xargs rpm -e --allmatches --nodeps # 卸载python # wget https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tgz 下载python2.7 # tar -zxvf Python-2.7.12.tgz # 解压 # 将解压的文件放到python2文件夹中 # cd python2 # ./configure # make # sudo make install # 建立python软连接 # ln -s /usr/local/bin/python /usr/bin/python // ln -s 新安装的python路径 系统python路径 # 如果提示 ln: creating symbolic link `/usr/bin/python': File exists # mv /usr/bin/python /usr/bin/python_old // 去除原来存在的软连接 # ln -s /usr/local/bin/python /usr/bin/python //再精选软连接
3、安装pip
wget https://bootstrap.pypa.io/get-pip.py --no-check-certificate python get-pip.py
可直接查看配置链接 http://www.cnblogs.com/konglingxi/p/9722351.html
织梦狗教程
本文标题为:云服务器centos系统安装python
基础教程推荐
猜你喜欢
- Python+OpenCV实战之实现文档扫描 2022-10-20
- 远程和Ubuntu服务器进行Socket通信,使用python和C#(准备篇) 2023-09-05
- windows下面使用多版本Python安装指定版本的虚拟环境 2023-09-04
- MySQL数据优化-多层索引 2023-08-11
- 云服务器Ubuntu更改默认python版本 2023-09-03
- python验证多组数据之间有无显著差异 2023-08-08
- 创建python虚拟环境(在ubuntu16.04中) 2023-09-04
- Python爬虫爬取属于自己的地铁线路图 2023-08-05
- linux 安装 python3 2023-09-03
- 使用Pycharm创建一个Django项目的超详细图文教程 2022-09-02