简体   繁体   English

CentOS7上安装Python3.10导致文件类型不同

[英]Python3.10 installation on CentOS7 results in a different file type

I was trying to install python3.10 on CentOS7 by following This Guide我试图按照本指南在 CentOS7 上安装 python3.10

However, even after following the steps, I still can't use python3.10.但是,即使按照步骤操作,我仍然无法使用 python3.10。 After investigating /usr/local/bin, I found out that the python3 file (which comes preinstalled) have a different file type compared to the installed python3.10 (can be seen from the different color below)在调查 /usr/local/bin 之后,我发现 python3 文件(预安装的)与安装的 python3.10 相比具有不同的文件类型(可以从下面的不同颜色中看出)

The Image (I can't add image yet)图片(我还不能添加图片)

Is there a way to fix this or am I missing some steps?有没有办法解决这个问题或者我错过了一些步骤?

Edit: if it helps, it seems that the color of python3.10 is the same as a python3 module编辑:如果有帮助,python3.10 的颜色似乎与 python3 模块相同

Alright, so it turns out that I needed to create a symlink on /usr/bin.好吧,事实证明我需要在 /usr/bin 上创建一个符号链接。 So to fix this I run the following command on the terminal所以要解决这个问题,我在终端上运行以下命令

ln -s /usr/local/bin/python3.10 /usr/bin

Afterwards I can use the command python3.10之后我可以使用命令 python3.10

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM