Build any python version for venv: Difference between revisions
Jump to navigation
Jump to search
Line 13: | Line 13: | ||
wget -O- https://www.python.org/ftp/python/${ver}/Python-${ver}.tar.xz | tar xJf - | wget -O- https://www.python.org/ftp/python/${ver}/Python-${ver}.tar.xz | tar xJf - | ||
cd Python-${ver} | cd Python-${ver} | ||
./configure --enable-optimizations --with-lto=full --disable-test-modules --prefix=$PWD/run --exec-prefix=$PWD/run | ./configure --enable-optimizations --with-lto=full --disable-test-modules --prefix=$PWD/run --exec-prefix=$PWD/run --libdir=$PWD/run/lib --with-ensurepip=install | ||
make -j8 | make -j8 | ||
make install | make install |
Revision as of 00:53, 3 February 2023
Build Python
Optional Prerequisites
Most should be there, check https://devguide.python.org/getting-started/setup-building/index.html#install-dependencies for details
zypper in tk-devel sqlite3-devel gdbm-devel readline6-devel
User Build
ver=3.11.1 cd wget -O- https://www.python.org/ftp/python/${ver}/Python-${ver}.tar.xz | tar xJf - cd Python-${ver} ./configure --enable-optimizations --with-lto=full --disable-test-modules --prefix=$PWD/run --exec-prefix=$PWD/run --libdir=$PWD/run/lib --with-ensurepip=install make -j8 make install
Use The Build
run/bin/python3 --version
run/bin/python3 -m venv /new/env/path
. /new/venv/path/bin/activate