-1

Whenever I open a file in vim and type :!python3, python3.8 opens. However, I want it to refer to python3.9.

How do I change it?

1
  • Welcome to Vi and Vim! Note that :! will run a non-interactive shell by default. Depending on the shell used, some initialization files may be skipped, e.g. Bash will not read ~/.bashrc when started non-interactively. Hypothesis: you happen to append to PATH or define an alias for Python and it's not available. Refer to your shell's documentation or edit and clarify. Commented May 3 at 14:36

1 Answer 1

1

:!python3 calls the first python3 executable found in $PATH, which is probably a link of sort to python3.8.

If you want it to be a link to something else, then do it at the system level. Refer to Python's documentation for how to do that.

This has nothing to do with Vim.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.