I already have Python 3.4.3 installed but I want to leave that undisturbed and instead use the instructions to install another copy of Python 3 (being Python 3.6).

I'm following the second part of the instructions here : https://askubuntu.com/a/680828/257420 . Specifically I am downloading a version of Python and building it in the /opt directory.

When I execute the 'make' everything seems to work fine but having run the make in /opt/Python-3.6.4 I'm expecting to find a /opt/Python-3.6.4/bin/ and there is no such directory.


Given that I don't have a bin I presume the make has failed ? Or should I be looking somewhere else for the bin because times have changed since the answer I'm following was written ?


I am attempting to build Python 3.6.4 (https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tar.xz).

This is my env

glaucon@polo ~ $ inxi -S
System:    Host: polo Kernel: 3.13.0-37-generic x86_64 (64 bit) Console: tty 4 Distro: Linux Mint 17.1 Rebecca

EDIT: I have just completed a

find / -name "python3"

while on as root and there was no sign of (for instance) python3.6 .

EDIT2 Here's the output from 'make' on subsequent invocations

polo Python-3.6.4 # make
running build
running build_ext
INFO: Can't locate Tcl/Tk libs and/or headers

Python build finished successfully!
The necessary bits to build these optional modules were not found:
_bz2                  _lzma                 _tkinter
To find the necessary bits, look in setup.py in detect_modules() for the module's name.

The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
atexit                pwd                   time
running build_scripts
copying and adjusting /opt/Python-3.6.4/Tools/scripts/pydoc3 -> build/scripts-3.6
copying and adjusting /opt/Python-3.6.4/Tools/scripts/idle3 -> build/scripts-3.6
copying and adjusting /opt/Python-3.6.4/Tools/scripts/2to3 -> build/scripts-3.6
copying and adjusting /opt/Python-3.6.4/Tools/scripts/pyvenv -> build/scripts-3.6
changing mode of build/scripts-3.6/pydoc3 from 644 to 755
changing mode of build/scripts-3.6/idle3 from 644 to 755
changing mode of build/scripts-3.6/2to3 from 644 to 755
changing mode of build/scripts-3.6/pyvenv from 644 to 755
renaming build/scripts-3.6/pydoc3 to build/scripts-3.6/pydoc3.6
renaming build/scripts-3.6/idle3 to build/scripts-3.6/idle3.6
renaming build/scripts-3.6/2to3 to build/scripts-3.6/2to3-3.6
renaming build/scripts-3.6/pyvenv to build/scripts-3.6/pyvenv-3.6

Unfortunately the output from the first invocation of 'make' is lost and it was significantly different . Once I'm happy that my first attempt at 'make' was completely useless I will delete the /opt/Python3.6.4 directory and repeat the 'make' while capturing the output.

EDIT3 Following information from @unixpower I did a 'make clean' followed by a 'make' and the output from that command is visbile at : https://pastebin.com/Bq04MXA0 .

Unfortunately there still isn't an /opt/Python-3.6.4/bin . Just to confuse matters however I'm almost certain that the 'make' output finished somewhere differently the first time I used it than this last time !

Any comments would be welcome.

  • Can you show the output of the make command? – nixpower Jan 8 '18 at 0:38
  • @nixpower : Thanks for your response. I can, and will, add the 'make' output but unfortunately when I run 'make' now the output is significantly different to that when I first ran. When I first ran it there was a lot of output now there's very little as you can see in my 'EDIT2' above. – glaucon Jan 8 '18 at 0:45
  • 1
    Did you run the make install command? No files will be copied to /opt/ until your run that command. – Kesara Jan 8 '18 at 2:02
  • 2
    BTW you don't have to run make on /opt/Python-3.6.4, you just have untar all tarball any directory and use ./configure --prefix=<your directory> to tell what directory you need to install files to. – Kesara Jan 8 '18 at 2:05
  • 1
    @glaucon Since you've found the solution -- that you must run make install (or sudo make install, depending on where you're installing) to actually install software that you have compiled by running ./configure and make -- I recommend posting it as an answer. – Eliah Kagan Jan 8 '18 at 2:47

Run make install to install files to /opt/Python-3.6.4/.

Files don't have to be compiled on /opt/Python-3.6.4/ to install it there. When running ./configure step, you can provide the target directory as the prefix. Example: ./configure --prefix=<target_directory>

More information: https://askubuntu.com/a/191391/116563

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.