Home > Software engineering >  Upgrade python 2 to python 3.8.8 in SUSElinux and install pip3
Upgrade python 2 to python 3.8.8 in SUSElinux and install pip3

Time:09-16

I have python 2.9 on my suse-linux machine.

(SUSE Linux Enterprise Server 12 SP1)

I have upgraded it to python 3.8.8.

When I am trying to install pip using

zypper install python3-pip

It says, python3-pip not found.

I am afraid if python3 is not installed properly,

Have run python3.8 -m test, I see some error

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.

Have seen quite a few questions in Stackoverflow, nothing really helped.

Could someone help me fix this?

Edit (How I installed 3.8.8 - as root user):

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

CodePudding user response:

Try:

/usr/local/bin/python -m ensurepip --upgrade

/usr/local/bin/pip --version

CodePudding user response:

Was always facing AttributeError & SystemError.

Installed Anaconda and that solved all the problems for me.

  • Related