gpt4 book ai didi

python - 如何在 CentOS 7 中将 IDLE 3.6.2 与 Python 3.6.2 关联

转载 作者:行者123 更新时间:2023-12-04 19:43:12 24 4
gpt4 key购买 nike

CentOS 7自带Python2.7.5
我安装了Python 3.6.2 ,并且能够通过键入 IDLE 3.6.2 在终端中启动 IDLE 3.6.2 .

但是,当我使用 F5 运行时,我仍然得到 Python 2.7.5而不是 python 3.6.2.
我试着做

./configure

make altinstall

没有解决问题。我该如何解决这个问题?

最佳答案

运行这些命令:

  • yum groupinstall "Development Tools"
  • yum -y install yum-utils yum-builddep python zlib-devel gcc
  • cd /usr/src
  • wget https://www.python.org/ftp/python/3.6.2/Python-3.6.2rc1.tgz
  • tar xzf Python-3.6.2rc1.tgz
  • cd Python-3.6.2rc1/
  • ./configure
  • make
  • make install
  • which python3 && python3 -V
  • 关于python - 如何在 CentOS 7 中将 IDLE 3.6.2 与 Python 3.6.2 关联,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45623282/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com