Skip to content Skip to sidebar Skip to footer

Python 3.6 Installation And Lib64

I'm trying to install the new Python (3.6, released just a few weeks back) from source on openSUSE 42.2. Everything ./configure --prefix /home/paul/2017 --enable-optimizations make

Solution 1:

The opensuse openSUSE:Factory python3x has patches for that.

Links: Python 3.6Python 3.8Python 3.9

Spec files are usually a good starting point.

Note: the install step would install a python3 in /usr/local/bin. Changing that to altinstall avoids shadowing the system-wide python3.

Install

Create a downloads variable pointing to a directory where all downloaded files (python source and factory patches) will be saved

export downloads=/usr/local/build/downloads

In a user writable directory:

tar --no-same-owner -xvf $downloads/Python-3.6.4.tar.xz
cd Python-3.6.4

patch -p1 < $downloads/python-3.6.0-multilib-new.patch
patch -p0  < $downloads/python-3.3.0b1-localpath.patch
patch -p0 < $downloads/python-3.3.0b1-curses-panel.patch

# mind this step, otherwise# none of the modules in `lib-dynload` could be imported !
autoreconf -i

mkdir build; cd$_
../configure --enable-optimizations --enable-ipv6 \
             --with-fpectl --enable-shared --with-system-ffi \
             --with-system-expat --enable-loadable-sqlite-extensions
make -j $(nproc)
# altinstall, not install (see above)
sudo make altinstall

Uninstall

To get rid of the installed files:

sudo rm -rf /usr/local/lib64/python3.6/
sudo rm -f /usr/local/lib64/libpython3.6m*
sudo rm -f /usr/local/lib64/libpython3.so
sudo rm -f /usr/local/lib64/pkgconfig/python-3.6*
sudo rm -f /usr/local/bin/python-3.6*

For python3.7

tar --no-same-owner -xvf $downloads/Python-3.7.3.tar.xz
cd Python-3.7.3
patch -p1 < $downloads/python-3.7.3-python-3.6.0-multilib.patch
patch -p1 < $downloads/python-3.7.3-distutils-reproducible-compile.patch
patch -p0 < $downloads/python-3.7.3-python-3.3.0b1-localpath.patch
patch -p0 < $downloads/python-3.7.3-00251-change-user-install-location.patch

# do not forget !
autoreconf -i

mkdir build; cd$_
../configure --enable-optimizations --enable-ipv6 --enable-shared --with-system-ffi --with-system-expat --enable-loadable-sqlite-extensions

make -j $(nproc)

sudo make altinstall

For python 3.8

tar --no-same-owner -xvf $downloads/Python-3.8.1.tar.xz
cd Python-3.8.1/
patch -p1 < $downloads/python-3.8.1-F00102-lib64.patch
patch -p1 < $downloads/python-3.8.1-F00251-change-user-install-location.patch
patch -p1 < $downloads/python-3.8.1-SUSE-FEDORA-multilib.patch
patch -p1 < $downloads/python-3.8.1-distutils-reproducible-compile.patch
patch -p1 < $downloads/python-3.8.1-python-3.3.0b1-localpath.patch

# do not forget !
autoreconf -i

mkdir build; cd$_
../configure --enable-optimizations --enable-ipv6 --enable-shared \
             --with-system-ffi --with-system-expat \
             --enable-loadable-sqlite-extensions
make -j $(nproc)
# altinstall, not install (see above)
sudo make altinstall

Solution 2:

Ok, I found a solution: If one configures with the --enable_shared option the problem somehow goes away. Good enough for me.

Post a Comment for "Python 3.6 Installation And Lib64"