Python通过termin在openSUSE Leap中安装

2024-03-29 09:43:38 发布

您现在位置:Python中文网/ 问答频道 /正文

我是openSUSE新手,我想通过终端安装最新的python版本,而不是使用YaST。你知道吗

我已经在他们的网站上下载了最新的python tarball,提取了它,并通过终端输入了文件夹。然后我继续执行“./configure”并得到一些错误。你知道吗

:~/Downloads/Python-3.7.4> ./configure
configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for python3.7... no
checking for python3... python3
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... checking for --without-gcc... no
checking for --with-icc... no
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/home/egydio/Downloads/Python-3.7.4':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details

Tags: nognu终端forconfigurelinuxdownloadstype
1条回答
网友
1楼 · 发布于 2024-03-29 09:43:38
# Tested on OpenSUSE 15.1. Likely to work on many versions of OpenSUSE.
# This is a minimal install.  You can add additional modules to your liking.
sudo zypper in gcc zlib-devel libffi-devel readline-devel
sudo zypper in libopenssl-devel  # Optional. Allows compiling against OpenSSL.
wget https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tar.xz
unxz Python-3.7.4.tar.xz
tar -xf Python-3.7.4.tar
cd Python-3.7.4
./configure
make
make test
sudo make install
sudo ln -s /usr/local/lib64/python3.7/lib-dynload/ /usr/local/lib/python3.7/lib-dynload  # This symlink corrects the readline error.

相关问题 更多 >