0

I had 3.11 already and installed 3.10 now.

ls
3.10    3.11    Current
pwd
/Library/Frameworks/Python.framework/Versions/3.10/bin
ls
2to3            pip3.10         python3-intel64
2to3-3.10       pydoc3          python3.10
idle3           pydoc3.10       python3.10-config
idle3.10        python3         python3.10-intel64
pip3            python3-config
python3 --version
Python 3.11.4

Why is it showing as 3.11.4 when the directory I am in is /Library/Frameworks/Python.framework/Versions/3.10/bin?

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
Akshay J
  • 5,362
  • 13
  • 68
  • 105

1 Answers1

0

because of the path search order

export PATH=/dir1:/dir2:$PATH

so when you type python3, it found the 3.11 first

you can use

./python3 --version

which will output 3.10

Xiaomin Wu
  • 400
  • 1
  • 5