Posted on 2018-09-23
$ sudo apt-get install build-essential checkinstall python3-dev $ sudo apt-get install libreadline-gplv2-dev libncursesw5-dev $ sudo apt-get install libssl-dev libsqlite3-dev tk-dev $ sudo apt-get install libgdbm-dev libc6-dev libbz2-dev $ sudo apt-get install libffi-dev openssl
$ which -a python $ which -a python2 $ which -a python3 /usr/bin/python3 $ python3 Python 3.5.2 (default, Nov 23 2017, 16:37:01) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>>
$ wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
$ tar xf Python-3.7.0.tgz $ cd Python-3.7.0 $ ./configure $ make $ make test $ sudo make install
Python build finished successfully! The necessary bits to build these optional modules were not found: _lzma _uuid To find the necessary bits, look in setup.py in detect_modules() for the module's name.
== Tests result: SUCCESS == 401 tests OK. 14 tests skipped: test_devpoll test_gdb test_kqueue test_lzma test_msilib test_ossaudiodev test_startfile test_tix test_tk test_ttk_guionly test_winconsoleio test_winreg test_winsound test_zipfile64 Total duration: 15 min 41 sec Tests result: SUCCESS
The directory '/home/joe/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/home/joe/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Looking in links: /tmp/tmp3nc_ehwv Collecting setuptools Collecting pip Installing collected packages: setuptools, pip Successfully installed pip-10.0.1 setuptools-39.0.1
$ which -a python $ which -a python3 /usr/local/bin/python3 /usr/bin/python3 $ python3 Python 3.7.0 (default, Sep 22 2018, 10:05:13) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>>
$ ls -al /usr/local/bin/pyth* lrwxrwxrwx 1 root root 9 Sep 24 14:31 /usr/local/bin/python3 -> python3.7 -rwxr-xr-x 2 root root 13775472 Sep 24 14:35 /usr/local/bin/python3.7 lrwxrwxrwx 1 root root 17 Sep 24 14:31 /usr/local/bin/python3.7-config -> python3.7m-config -rwxr-xr-x 2 root root 13775472 Sep 24 14:35 /usr/local/bin/python3.7m -rwxr-xr-x 1 root root 3097 Sep 24 14:36 /usr/local/bin/python3.7m-config lrwxrwxrwx 1 root root 16 Sep 24 14:31 /usr/local/bin/python3-config -> python3.7-config root@antlet18:~#
It will be some time yet before we get a comments section working here. In the meantime feel free to send comments via email. On this site our name is Joe Python. The email address is our first name at joepython.com.