If I type which python I get no output and I have no success using Miniconda as default Python. I did set paths to ${HOME}/.profile but no success.
Here is my ${HOME}/.profile
The last line is mine. What am I doing wrong?
My goal is to point to Miniconda3 by default.
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi
export PATH="$PATH:/usr/bin/python3.6:/data/ubuntu/miniconda3/bin"
EDIT: /usr/bin/python3.6 is a valid path, I installed python 3.6 and miniconda3.
python, does it work?whichwill only return a path if you actually able to run the command without having to specify its path. – Eduardo Trápani Nov 01 '19 at 04:37pythonto invoke Python 3? Or you simply want Python 2?pythonis a symlink to Python 2 and isn't installed by default in >18.04. Which Ubuntu version are you using? What is the output ofsudo apt install python? – Kulfy Nov 01 '19 at 06:29python3 -V– Gunnar Hjalmarsson Nov 01 '19 at 19:57/usr/bin/python3.6a file, symbolic link, or a directory? The locations in the PATH variable should be directories only. You're providing locations for the shell to find files. You're not providing locations to the files themselves. In my case, I have Python 3.7 and it shows this: "-rwxr-xr-x 2 root root 4877888 Oct 7 20:56 /usr/bin/python3.7". This is a file and not a directory. – Ray Nov 05 '19 at 03:58