So I'm setting up my default variables in a new MacBook M1 and for some reason, my symlink doesn't seem to work.
Why is the following behaviour happening? The symlink from python
to python3
gets lost somehow. /Users/overflow/Documents/tools
is part of my PATH
variable.
$ type python
python is /Users/overflow/Documents/tools/python
$ python -V
Python 2.7.16
$ ls -lah /Users/overflow/Documents/tools/python
lrwxr-xr-x 1 overflow staff 16B 6 Oct 18:48 /Users/overflow/Documents/tools/python -> /usr/bin/python3
$ /usr/bin/python3 -V
Python 3.8.9
$ echo $PATH | sed 's/:/\n/g'
/Users/overflow/Documents/tools
/Users/overflow/Documents/Dropbox/productivity/bin
/Users/overflow/Documents/tools/confluent-6.1.0/bin
/Users/overflow/.sdkman/candidates/java/current/bin
/Users/overflow/.nvm/versions/node/v16.10.0/bin
/Users/overflow/bin
/usr/local/bin
/opt/homebrew/bin
/opt/homebrew/sbin
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
python3
orpython3.8
to run Python 3 – Agriculturepython
in current folder and it may run this command instead of/Users/overflow/Documents/tools/python
. Maybe you have path.
onPATH
so it may run commandpython
like./python
– Agriculturetype
command, it's awesome! - I've just replaced thewhich
statement with atype
one. Also added myPATH
there – Hammurabiwhich
but it was showing the same astype
. Now, thePATH
variable contains/Users/overflow/Documents/tools
, which is the directory containing the "exe" you mention that is the link I've just created. I'm not sure I get what you mean by that tbh. – Hammurabibash
orzsh
. I'm not sure if that would help in particular but it can help in narrowing down the search. – Cheyneyhash -r
and try again. It clears a cache in shell. – Marocainhash -r
didn't solve the issue. I would like to avoid using python managers and use the default one. – Hammurabialias python=python3.9
andalias pip=pip3.9
in my.zshrc
. This question may be of interest. – Prior