question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use the first python on PATH as the default python executable

See original GitHub issue

It would be nice if the extension used the PATH environment variable in order to find the default python executable. However, it does not do that:

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
luabudcommented, Apr 7, 2021

Right now it doesn’t seem to be it, but that’s what we’d like it to be in the future 😊 I couldn’t find where else we are tracking this change, so I just created a new issue for it: https://github.com/microsoft/vscode-python/issues/15887

1reaction
felipecrscommented, Sep 3, 2020

So what you want is for the $PATH checking to come first, right?

Exactly that.

Relatedly, should it only look for “python” and “python3” on $PATH, or also “python3.8” and “python38”?

In my opinion: only python and python3. That’s because as long as the python3.8 folder comes first in the PATH, this is where the python and python3 would be taken. And, I believe all those custom python installations make sure to expose a binary called python3 or just python in their /bin folder.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to change default python executable on Windows 10?
Open the 'System' properties. · Open Environment Variables · Highlight the 'Path' Variable and click edit. · Edit the values for the Python...
Read more >
How Should I Set Default Python Version In Windows?
This is if you have both the versions installed. Go to This PC → Right-click → Click on Properties → Advanced System Settings....
Read more >
How to Add Python to PATH
The first step is to locate the directory in which your target Python executable lives. The path to the directory is what you'll...
Read more >
Could we add Python to system PATH by default? - Ideas
(*) Running “python3.8.exe” via the registered “App Paths” key requires using the “.exe” extension. From the POV of the shell, “python3 ...
Read more >
How to set python path - Net-Informations.Com
/usr/local/bin/python is the default path of the Python directory. What is PYTHONPATH? PYTHONPATH is an environment variable which you can set to add...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found