python2 与 python3 实现共存的方法
作者:听风寻雨 时间:2023-06-13 23:56:29
1.现在我本机系统已内置python2.6
2.下载进行源码安装
复制链接下载到/root/mypackage,解压
接着
mkdir /usr/local/python3
然后在解压后的文件夹内执行以下命令,指定安装路径
./configure --prefix=/usr/local/python3
然后
make
接着
make install
备注:如果中间有报错,就再试一次
进入安装路径查看以下
看来,都不用改文件名了
建立软链接,因为不能直接使用该目录下的命令
ln -s /usr/local/python3/bin/python3 /usr/bin/python3[/code][code]ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3
接下来就是测试:
总结
以上所述是小编给大家介绍的python2 与 python3 实现共存的方法,希望对大家有所帮助
来源:https://www.cnblogs.com/youaremylife/archive/2018/07/12/9299667.html
标签:python2,python3,共存
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
ant design中实现table的表格行的拖拽
2024-06-09 19:51:02
![](https://img.aspxhome.com/file/2023/8/56628_0s.png)
sqlserver 多库查询 sp_addlinkedserver使用方法(添加链接服务器)
2011-09-30 11:49:22
Vue.js中轻松解决v-for执行出错的三个方案
2024-05-10 14:19:08
![](https://img.aspxhome.com/file/2023/2/126412_0s.jpg)
Bootstrap Table快速完美搭建后台管理系统
2024-05-09 09:48:16
段正淳的css笔记(5)未知图片垂直居中的方法
2007-11-01 22:06:00
浅谈Python 钉钉报警必备知识系统讲解
2023-11-13 15:14:38
![](https://img.aspxhome.com/file/2023/7/75907_0s.png)
opencv+mediapipe实现人脸检测及摄像头实时示例
2022-08-11 17:58:44
![](https://img.aspxhome.com/file/2023/6/100296_0s.jpg)
SQL点滴24 监测表的变化
2011-09-30 11:38:41
asp网上购物车实例代码
2007-10-03 13:43:00
Bootstrap进度条与AJAX后端数据传递结合使用实例详解
2024-04-28 10:18:32
Jquery插件easyUi表单验证提交(示例代码)
2023-07-02 05:31:51
Python正则表达式之基础篇
2021-06-17 13:10:45
![](https://img.aspxhome.com/file/2023/7/131497_0s.png)
Pandas实现批量拆分与合并Excel的示例代码
2022-06-07 22:36:28
![](https://img.aspxhome.com/file/2023/9/79489_0s.png)
在python中使用[[v]*n]*n遇到的坑及解决
2022-02-03 10:31:35
![](https://img.aspxhome.com/file/2023/5/89315_0s.png)
JS 实现请求调度器
2024-04-22 22:37:24
![](https://img.aspxhome.com/file/2023/8/135608_0s.png)
Python 函数那不为人知的一面
2022-09-24 10:03:31
![](https://img.aspxhome.com/file/2023/3/101063_0s.jpg)
Python中输出ASCII大文字、艺术字、字符字小技巧
2021-03-03 00:06:49
![](https://img.aspxhome.com/file/2023/9/93829_0s.png)
Python的类成员变量默认初始值的坑及解决
2023-12-02 18:46:47
Oracle基本PLSQL的使用实例详解
2024-01-21 11:17:41
Python生成二维码的教程详解
2023-05-31 08:41:43
![](https://img.aspxhome.com/file/2023/9/128319_0s.png)