Acid 大佬有话说 : 2019-12-7 14:13:20
Python版本安装疑问
求老哥们指点,我用wget下载python3.8.的压缩包,怎么安装完显示版本是3.6.8啊:L
ibmall 大佬有话说 : 2019-12-7 14:14:54
root@QuixoticRealistic-VM:~# python -V
Python 2.7.12
root@QuixoticRealistic-VM:~# python3 -V
Python 3.5.2
root@QuixoticRealistic-VM:~# python3.6 -V
Python 3.6.8
root@QuixoticRealistic-VM:~# python3.8 -V
?
cherbim 大佬有话说 : 2019-12-7 14:15:33
本帖最后由 cherbim 于 2019-12-7 14:26 编辑
说明没建立软链接….。比如你原本python3的软链接是3.6.8,你安装完3.8,不修改软链接,那等于没安装,输入python3还是3.6.8
解决方法(前提你确认3.8安装成功了,出现success):
ln -s /python3.8路径 /usr/bin/python3
若是提示存在/usr/bin/python3,直接 rm -rf /usr/bin/python3 再执行上述命令
找不到python3.8路径?输入一下指令找到安装路径,
whereis python3
Acid 大佬有话说 : 2019-12-7 14:18:03
root@ubuntu:~# python3.8 -V
Command ‘python3.8’ not found, did you mean:
command ‘python3.6’ from deb python3.6-minimal
command ‘python3.7’ from deb python3.7-minimal
Try: apt install <deb name>
老哥,我一输入就回复这个,是不是安装的不对啊:L
cherbim 大佬有话说 : 2019-12-7 14:21:07
Acid 大佬有话说 : 2019-12-7 14:18
root@ubuntu:~# python3.8 -V
Command ‘python3.8’ not found, did you mean:
看到apt,我就知道为啥了,你系统自带的python3指向的是3.6.8 ,把python3 软链接修改为python3.8
Acid 大佬有话说 : 2019-12-7 14:22:15
cherbim 大佬有话说 : 2019-12-7 14:15
说明没建立软链接….。比如你原本python3的软链接是3.6.8,你安装完3.8,不修改软链接,那等于没安装,输 …
谢谢老哥,安装的时候提示成功了,我先按你的方法试一试:lol
zxxx 大佬有话说 : 2019-12-7 14:27:05
安装是不是有个覆盖模式,直接替换原来的
rule 大佬有话说 : 2019-12-7 14:28:31
我猜你们这么搞,后面系统都会被你们玩挂掉,不要随便改系统软连接,增加一个软连接就行了,鬼知道系统哪里调用了python,到时候版本不一致肯定坑死人。
cooioobb 大佬有话说 : 2019-12-7 14:31:13
cherbim 大佬有话说 : 2019-12-7 14:21
看到apt,我就知道为啥了,你系统自带的python3指向的是3.6.8 ,把python3 软链接修改为python3.8 …
一般看见apt我就知道是源没改。哈哈哈跟我一样
rule 大佬有话说 : 2019-12-7 14:31:44
cherbim 大佬有话说 : 2019-12-7 14:21
看到apt,我就知道为啥了,你系统自带的python3指向的是3.6.8 ,把python3 软链接修改为python3.8 …
你牛逼,听不听随你