Installing the latest Python on openSUSE

I installed Python on openSUSE (see version below) using the Zypper package manager. This gives me Python 3.2, but some packages require Python 3.3. The update using zypper update python3remains on Python 3.2. How can I upgrade to 3.3, ideally using the package manager and reusing the rest of my working Python installation (site packages, pip ...)?

openSUSE 12.2 (x86_64)
VERSION = 12.2
CODENAME = Mantis
+4
source share
2 answers

devel: languages: python: Factory 1 Click Install Python 3.3.2 (, ).
( - > openSUSE 12.2- > - > 1 "" )

zypper ( GUI), :

sudo zypper ar http://download.opensuse.org/repositories/devel:/languages:/python:/Factory/openSUSE_12.2/devel:languages:python:Factory.repo

, , ( 0 = , 100 = ). repo, zypper lr . :

 sudo zypper mr -p priority repo_number

, . 50 , 99.
zypper update python3 python.

+4

, pyenv:

# Step 1. Install pyenv

git clone https://github.com/pyenv/pyenv.git ~/.pyenv
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init -)"\nfi' >> ~/.bashrc

# Step 2. Install missing headers for all the Python modules to be built

sudo zypper install readline-devel sqlite3-devel libbz2-devel

# Step 3. Install the desired Python version

pyenv install 3.6.3

https://gist.github.com/antivanov/01ed4eac2d7486a170be598b5a0a4ac7

0

Source: https://habr.com/ru/post/1502837/


All Articles