0

I've just noticed that when calling python from the command line, it just calls python from /usr/bin/python on account that it started v2.6:

$ python
Python 2.6.6 (r266:84292, Jun 11 2019, 11:01:44)

However, when running "which python", it correctly points to a newer version installed in a conda environment, calling it directly I see it starts the expected newer version.

$ which python
~/miniconda3/bin/python
$ ~/miniconda3/bin/python
Python 3.8.5 (default, Sep  4 2020, 07:30:14)

Python hasn't been aliased:

$ alias | grep python
$

and the conda environment path comes before the standard "/usr/bin" in my $PATH, so I don't understand why it executes python from "/usr/bin".

Any idea what could be going on?

Maikol
  • 195
  • 2
  • 2
  • 10
  • `type python` , `hash python` `hash -r` – KamilCuk Feb 25 '22 at 12:24
  • `which` is a nonstandard command which may or may not display bogus information. Use your shell's built-in commands `type` and `command` to query which commands, aliases, and functions are available. – tripleee Feb 25 '22 at 12:26
  • Thanks, afterr rrunning hash the shell now executes the right version of python. – Maikol Feb 25 '22 at 13:56

0 Answers0