Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

已经安装python3.6可安装该脚本还是提示python3: command not found #78

Closed
sdshdv opened this issue Dec 3, 2018 · 8 comments

Comments

@sdshdv
Copy link

sdshdv commented Dec 3, 2018

我有一台搬瓦工VPS,系统是CentOS Linux release 7.5,已经自己按照该页面: https://dev.to/lechatthecat/how-to-install-python3-in-centos7-1bk6 安装了python3.6,
输入python3.6 --version显示Python 3.6.5
输入python3.6 -m pip --version显示pip 9.0.1 from /usr/lib/python3.6/site-packages (python 3.6)
然后使用了 compgen -c | grep "^python" 这个命令查看了一下目前支持的python版本,显示这些:
python3.6m-x86_64-config
python3.6
python
python3.6-config
python2
python3.6m-config
python-config
python2.7-config
python3.6m
python2.7
python2-config
但是安装你的脚本的时候还是显示python3: command not found,想问下这个是怎么回事呢?

@sdshdv
Copy link
Author

sdshdv commented Dec 3, 2018

知道问题出在哪了,还要添加软链接到python3,让系统默认调用python3.6,不过还要单独更改yum配置,因为其要用到python2才能执行,否则会导致yum不能正常使用.
希望脚本里能添加检测到是centos7之后自动编译安装python新版本并自动修正yum配置的设置,网上有关这方面的教程挺多的,也幸亏是教程多,不然我这个小白真的搞不定,
如果作者觉得麻烦的话也建议不要在脚本页面中写这个脚本支持centos7,让之后的人少走弯路

@Jrohy
Copy link
Owner

Jrohy commented Dec 3, 2018

因为脚本默认是自动安装python3.4的,自动在线装,而不是自己手动去编译安装python3.6,自己手动装是另一回事了

@sdshdv
Copy link
Author

sdshdv commented Dec 3, 2018

我是先装过一次脚本了,第一次报错显示python3: command not found,然后看了下ISSUES里这个现象在centos7上很普遍, 所以才开始自己找centos7安装python3的教程的

@Jrohy
Copy link
Owner

Jrohy commented Dec 3, 2018

编译安装是不可能的,会导致一堆低配小鸡安装不上(无编译环境),假如在线安装python3.6也是这样,只能顾及最大限度普及安装也不失太落后(不会是用python2)

@Jrohy
Copy link
Owner

Jrohy commented Dec 3, 2018

我用的vultr centos7来测,还没用过板瓦工的centos7,回去有空测试下,建议用debian9装应该没问题

@Jrohy
Copy link
Owner

Jrohy commented Dec 4, 2018

@sdshdv 可以试下这个http://blog.51cto.com/wenguonideshou/2083301, 不编译安装而是yum, 看下脚本后面能不能全平台上python3.6, 今天会优化下python3的安装

@Jrohy
Copy link
Owner

Jrohy commented Dec 4, 2018

@sdshdv 改了centos7的py3安装方法,centos7默认装py3.6, 实测搬瓦工centos7可以了, 感谢反馈😄

@sdshdv
Copy link
Author

sdshdv commented Dec 4, 2018

嗯好的,感谢作者进行修复!!

@Jrohy Jrohy closed this as completed Dec 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants