[英]python3.5 --version command not found CentOS 7
After installation of python 3.5.2 on CentOS 7 command "python3.5 -V" cannot find this command. 在CentOS 7上安装python 3.5.2之后,命令“ python3.5 -V”找不到此命令。 There is python2.7 installed by default and if we type "python -V" we can see the version 2.7.5. 默认情况下安装了python2.7,如果键入“ python -V”,我们可以看到版本2.7.5。 How can I install python 3.5.2 on CentOS to make "python3.5 -V"(and other commands with python3.5) work. 如何在CentOS上安装python 3.5.2,以使“ python3.5 -V”(以及其他带有python3.5的命令)正常工作。
See all the versions of Python you have available: 查看可用的所有Python版本:
$ compgen -c | grep "^python"
The output will be something like 输出将类似于
python3
python3-32
python3-config
python3.5
python3.5-32
python3.5-config
python3.5m
python3.5m-config
python3
python3-32
python3-config
python3.5
python3.5-32
python3.5-config
python3.5m
python3.5m-config
python
python-config
python2.6
python2.6-config
python2.7
python2.7-config
pythonw
pythonw2.6
pythonw2.7
Make sure the version you're looking for is in that list. 确保您要查找的版本在该列表中。 Then, take that and run (if python3.5
is in the list): 然后,执行并运行(如果python3.5
在列表中):
$ python3.5 -V
Which should output something like 哪个应该输出类似
Python 3.5.2
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.