Suse Linux에서 Python 2를 3.8.8로 업그레이드하고 pip3 설치

Suse Linux에서 Python 2를 3.8.8로 업그레이드하고 pip3 설치

내 suse-linux 시스템(SUSE Linux Enterprise Server 12 SP1)에 Python 2.9가 있습니다. Python 3.8.8로 업그레이드했습니다.

다음을 사용하여 pip를 설치하려고 하면

zypper install python3-pip

python3-pip를 찾을 수 없다고 나옵니다. python3이 제대로 설치되지 않은 것 같습니다.

을 실행하면 python3.8 -m test다음 오류가 발생합니다.

AttributeError: module 'posix' has no attribute '_all_'
During handling above exception, another exception occured:
SystemError: <built-in function dir> returned NULL without setting an error.

Python 3.8.8을 설치한 방법은 다음과 같습니다. 루트로 다음 명령을 실행했습니다.

wget https://www.python.org/ftp/python/3.8.8/Python-3.8.8.tgz
tar -xvzf Python-3.8.8.tgz
cd Python-3.8.8
./configure
make
make install
export PATH=/usr/local/bin:$PATH

Stack Overflow에서 꽤 많은 질문을 읽었지만 실제로 도움이 된 것은 없습니다.

누군가 이 문제를 해결하도록 도와줄 수 있나요?

답변1

Anaconda를 설치하면 문제가 해결되었습니다.

관련 정보