Build any python version for venv: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(10 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
Status: builds and run/bin/python3 --version works. But venv, pip or interpreter mode do not. | Status: builds and run/bin/python3 --version works. But venv, pip or interpreter mode do not. | ||
== | Asked for help: https://discuss.python.org/u/joba-1/activity (github based account) | ||
== Prerequisites == | |||
Most should be there, check https://devguide.python.org/getting-started/setup-building/index.html#install-dependencies for details | 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 | zypper in tk-devel sqlite3-devel gdbm-devel readline6-devel openssl-devel libffi-devel | ||
== User Build == | == User Build == | ||
Line 17: | Line 19: | ||
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 | ./configure --enable-optimizations --with-lto=full --prefix=$PWD/run --libdir=$PWD/run/lib | ||
make -j8 | make -j8 | ||
make install | make install | ||
run/bin/python3 --version | |||
Newer script on my github: https://gist.github.com/joba-1/1b0ae5514cc2e448b184f6afbf29f6df | |||
== Use The Build == | == Use The Build == | ||
Line 27: | Line 33: | ||
run/bin/python3 -m venv /new/env/path | run/bin/python3 -m venv /new/env/path | ||
. /new/ | . /new/env/path/bin/activate | ||
pip install anything... |
Latest revision as of 15:58, 22 February 2023
Build Python
work in progress
Status: builds and run/bin/python3 --version works. But venv, pip or interpreter mode do not.
Asked for help: https://discuss.python.org/u/joba-1/activity (github based account)
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 openssl-devel libffi-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 --prefix=$PWD/run --libdir=$PWD/run/lib make -j8 make install run/bin/python3 --version
Newer script on my github: https://gist.github.com/joba-1/1b0ae5514cc2e448b184f6afbf29f6df
Use The Build
run/bin/python3 --version
run/bin/python3 -m venv /new/env/path
. /new/env/path/bin/activate
pip install anything...