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.

Changes to logic for selection of best (default) version of Python interpreter

See original GitHub issue

Related to #3326

Today we use python as the default version of Python for the extension.

Logic for selection of best (default) version of Python interpreter:

  • Pick interpreter with highest version and bitness

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
ericsnowcurrentlycommented, Jan 7, 2019

This mostly worked for me on master. Instead of picking “python” as it used to, it picked Python 3.7.0 64-bit ('.env': virtualenv). The following were available:

  • Python 2.7.15 64-bit
  • Python 3.5.2 64-bit
  • Python 3.6.4 64-bit (‘.miniconda3’: conda)
  • Python 3.6.7 64-bit
  • Python 3.7.0 64-bit (‘.env’: virtualenv)
  • Python 3.7.0 64-bit (‘test env’: conda)
  • Python 3.7.0 64-bit (‘3.7.0’: pyenv)
  • Python 3.7.1 64-bit (‘base’: conda)
  • Python 3.7.1 64-bit

So it’s not clear why it did not pick 3.7.1, nor why it preferred the virtualenv over conda or pyenv (for 3.7.0). I would have expected it to pick 3.7.1. In the face of a tie (as with 3.7.0) I would have expected it to ask me.

All that said, picking 3.7.0 instead of 2.7 is an improvement. 😃

0reactions
brettcannoncommented, Jan 7, 2019

@ericsnowcurrently the order preference is venv, virtualenv, pipenv, global, conda; IOW this worked the way it’s designed. The thinking is the first three options were on purpose and are directly tied to the workspace folder, and conda is last because (a) it isn’t directly tied to a directory and (b) it’s slow to detect 😁 .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure a Python interpreter | PyCharm Documentation
Press Ctrl+Alt+S to open the IDE settings and select Project <project name> | Python Interpreter. · Expand the list of the available interpreters ......
Read more >
Check the Version of the Python Interpreter
Method 1.​​ Here is some step that the user must follow to get the currently running version of the python interpreter: Open cmd/terminal/windows ......
Read more >
Changing the Python installation used by Squish binary ...
It is possible to configure a Squish installation to use an external Python interpreter. The installation has to contain the support (plugin) ...
Read more >
The right and wrong way to set Python 3 as default on a Mac
You do not want the Mac OS X 'default Python' to be 'python3. ... This tool manages multiple versions of Python and is...
Read more >
What's New In Python 3.7 — Python 3.11.1 documentation
Initially PEP 484 was designed in such way that it would not introduce any changes to the core CPython interpreter. Now type hints...
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