Skip to content

Instantly share code, notes, and snippets.

@tsuyukimakoto
Last active June 17, 2019 12:33
Show Gist options
  • Save tsuyukimakoto/3aa32b18592bc76b8dfccb240f8d98fb to your computer and use it in GitHub Desktop.
Save tsuyukimakoto/3aa32b18592bc76b8dfccb240f8d98fb to your computer and use it in GitHub Desktop.
Memo: Install Python 3.8 beta1 on Ubuntu 19.04
$ sudo apt update -y && sudo apt upgrade -y
$ sudo apt-get install build-essential libssl-dev zlib1g-dev
$ sudo apt-get install uuid-dev  # for uuid time safe
$ sudo apt-get install libffi-dev  # for _ctypes
$ sudo apt-get install libsqlite3-dev  # for sqlite3

$ wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0b1.tgz
$ tar xzf ./Python-3.8.0b1.tgz
$ cd Python-3.8.0b1/
$ ./configure --prefix=$HOME/beta1 --enable-shared --enable-optimizations
$ make -j2
$ make altinstall
$ ~/beta1/bin/python3.8
/home/guest/beta1/bin/python3.8: error while loading shared libraries: libpython3.8.so.1.0: cannot open shared object file: No such file or directory
$ ldd ~/beta1/bin/python3.8
  linux-vdso.so.1 (0x00007ffe0b164000)
  libpython3.8.so.1.0 => not found
  libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff69cf47000)
  /lib64/ld-linux-x86-64.so.2 (0x00007ff69d140000)
$ sudo find / -name libpython3.8.so.1.0
/home/guest/beta1/lib/libpython3.8.so.1.0
/home/guest/Python-3.8.0b1/libpython3.8.so.1.0
^C
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/beta1/lib
$ ~/beta1/bin/python3.8
Python 3.8.0b1 (default, Jun  9 2019, 05:33:10)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment