1

I am completely new to Linux and Ubuntu(17.10). I just did a fresh install, and I have administrator rights. I downloaded and extracted Python 3.6.3 to my home directory, and not in the usr/bin where I want it located. Trying to extract to usr/bin got me a warning about not having required permissions?

I am trying to get the Katoolin script to work, which looks for Python in usr/bin/python, which obviously does not exist.

Can someone please explain how to either move the Python-3.6.3 directory/folder over to my usr/bin directory or what I can do correct this problem?

  • 4
    in 17.10, 3.6.3 is the default version for python3. No need to install anything. – Jacob Vlijm Nov 01 '17 at 20:25
  • usr/bin is only for binaries/executables and/or links to binaries/executables. You probably don't want to be extracting Python there. I don't know about Python, but for Anaconda (a specific distribution of Python), you can choose where to install it. Did you install it or just extract it? Once installed, you can create a link to it in usr/bin. – Andrew Shum Nov 01 '17 at 20:26
  • 2
    @AndrewShum `$ which python3`: `/usr/bin/python3`, but again ***You don't need to install anything***. Please don' t just shout the first thing that pops into the mind. – Jacob Vlijm Nov 01 '17 at 20:28
  • @Jacob Sorry, you posted while I was writing mine. – Andrew Shum Nov 01 '17 at 20:32
  • 1
    @AndrewShum no offense. – Jacob Vlijm Nov 01 '17 at 20:35

1 Answers1

0

All you need to do is link python to whatever edition you want to use as default.

You can check if you have python2 and python3 by using:

which python2
which python3

Most probably they will already be in your /usr/bin/. You can check where the link lead to by using:

ls -l /usr/bin/python3

To link one of them as default use:

ln -s /usr/bin/python3 /usr/bin/python

You can now call python --version to check exact version. You can now also use #!/usr/bin/python in your Python scripts.

Nux
  • 119
  • 7