i have installed python 3 ..
when i do :
ls -ltr /usr/bin | grep python (in buildah it will be $mount_container/usr/bin)
0 lrwxrwxrwx. 1 root root 25 Jan 7 10:12 python3 -> /etc/alternatives/python3
0 lrwxrwxrwx. 1 root root 31 Jun 22 2019 python3.6 -> /usr/libexec/platform-python3.6
0 lrwxrwxrwx. 1 root root 32 Jun 22 2019 python3.6m -> /usr/libexec/platform-python3.6m
0 lrwxrwxrwx. 1 root root 24 Jan 7 10:12 unversioned-python -> /etc/alternatives/python
but when i do
$/usr/bin/python3
it is saying "no such file or directory".
Note that i am running this inside a continer (using buildah , trying to build a docker which has python3)
if i do $mount_continer/usr/bin/python3
it says "no such file or directory"
Try:
cd / (goes into root directory)
and then type
/usr/bin/python3
Now you must see the python interpreter.
Explanation - Python is generally found in the location /usr/bin/
/usr/bin/python3
will simply invoke the python3 found inside /usr/bin
but since you run the command from outside the root directory,the first directory i.e /usr
is not found. /home
and /usr
are inside the root directory, and you are running the command from /home
directory. Hope it helps.
Note:For Ubuntu 16.04