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.

Test: Improvements to "No Python interpreter" selected prompts

See original GitHub issue

Refs: https://github.com/microsoft/vscode-python/issues/17667

Complexity: 3

Create Issue


Requirements:

  • Access to a machine with no Python installed, maybe a devcontainer for linux.
  • Pre-release version of the Python extension installed

Steps:

Case 1: No Python installed

  • Open a Python file, and use button on top right to run it: image
  • Verify the following prompt shows up: image
  • Verify clicking Select Interpreter opens the quickpick saying: image

Case 2: Invalid Python selected

  • Have Python installed.
  • Select an invalid interpreter. You can use Python: Select Interpreter command and choose Enter interpreter path... item.
  • Verify following prompt shows up on running Python file in this case: image

Case 3: Invalid Python selected: multiroot scenario with multiple workspace folders opened

  • In this case verify the prompt message describes the workspace folder affected: image

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
isidorncommented, Jul 27, 2022

I was able to rm all instances of python that were listed in the Python: Select Interpreter command and then test this item. Thanks for help.

0reactions
karrtikrcommented, Jul 26, 2022

it looks like I can still run Python files

  • What is the command being used to run it?
  • What is the path to binary that it’s using, is that deleted? Use python -c"import sys;print(sys.executable)" to get the full path.

An alternative could be to run Python: Select Interpreter command and delete every binary file listed there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Trying to get PyCharm to work, keep getting "No Python ...
Open your settings dialogue CTRL + ALT + S · Then you will need to type in interpreter in the search box: ·...
Read more >
Using Python environments in VS Code
Using Python environments in VS Code. This article discusses the helpful Python environments features available in Visual Studio Code. An "environment" in ...
Read more >
[Solved] No python interpreter configured for the project pycharm
" No Python interpreter selected " is the most common error while writing python code in Pycharm. In this video, we will see...
Read more >
doctest — Test interactive Python examples — Python 3.11.1 ...
You can instruct the Python interpreter to run the doctest module directly from the standard library and pass the module name(s) on the...
Read more >
Usage and Invocations — pytest documentation
You can invoke testing through the Python interpreter from the command line: ... Pytest supports several ways to run and select tests from...
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