Skip to content

Instantly share code, notes, and snippets.

@yuuki0xff
Last active February 4, 2020 02:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuuki0xff/ad62883c6623d96be089a73842c24c36 to your computer and use it in GitHub Desktop.
Save yuuki0xff/ad62883c6623d96be089a73842c24c36 to your computer and use it in GitHub Desktop.
Build python3.8 on Linux Mint LMDE3
# Build python3.8 with UCS4 support on Linux Mint LMDE3.
#
# TODO: Download source codes of tcl and tk. https://www.tcl.tk/software/tcltk/download.html
# TODO: Download source code of python3.7. https://www.python.org/downloads/source/
# Original script: https://github.com/yuuki0xff/docker-nvpy/blob/master/Dockerfile
set -euv
sudo apt update
sudo apt install -y build-essential
sudo apt build-dep -y tcl tk python3.5
PREFIX=/opt/nvpy
tar xf tcl*-src.tar.gz
tar xf tk*-src.tar.gz
tar xf Python*.tgz
cd tcl*/unix
./configure --prefix=$PREFIX --enable-threads --enable-shared --enable-symbols --enable-64bit --enable-langinfo --enable-man-symlinks
make
sudo make install
cd ../..
cd tk*/unix
./configure --prefix=$PREFIX --enable-threads --enable-shared --enable-symbols --enable-64bit --enable-man-symlinks
make
sudo make install
cd ../..
cd Python*
./configure --prefix=$PREFIX --enable-shared --enable-optimizations --enable-ipv6 --enable-unicode=ucs4 --with-lto --with-signal-module --with-pth --with-wctype-functions --with-tcltk-includes=/usr/local/include/ --with-tcltk-libs=/usr/local/lib/
make
sudo make install
sudo LD_LIBRARY_PATH=$PREFIX/lib /opt/nvpy/bin/python3 -m pip install --upgrade nvpy
sudo tee /usr/local/bin/nvpy <<'EOS'
#!/bin/sh
export LD_LIBRARY_PATH=/opt/nvpy/lib
exec /opt/nvpy/bin/python3 -m nvpy "$@"
EOS
sudo chmod +x /usr/local/bin/nvpy
# Please execute "/usr/local/bin/nvpy".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment