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.

python.exe file in venv not being recognised by interpreter selector

See original GitHub issue

Issue Type: Bug

Behaviour

When the file path is selected it shows a warning triangle. The interpreter is selected but unrecognised. When I enter the path for the pythonw file, it is recognised and the warning changes to ‘venv’:venv

Screenshot (47)

screenshot running using .\venv\Scripts\python.exe in terminal

Screenshot (48)

Expected vs. Actual

I expect the bottom right corner to show ‘venv’:venv, but it doesn’t

Screenshot (46)

Steps to reproduce:

  1. create venv
  2. activate venv using source venv\Scripts\activate
  3. ctrl+shft+p then enter file path through file explorer

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.10.2, Pip
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): venv
  • Value of the python.languageServer setting: Default
Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX

User Settings


languageServer: "Pylance"

linting
• flake8Enabled: true

Extension version: 2022.10.1 VS Code version: Code 1.69.2 (3b889b090b5ad5793f524b5d1d39fda662b96a2a, 2022-07-18T16:12:52.460Z) OS version: Windows_NT x64 10.0.19044 Restricted Mode: No

System Info
Item Value
CPUs Intel® Celeron® N4000 CPU @ 1.10GHz (2 x 1094)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: disabled_off
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 3.83GB (0.46GB free)
Process Argv –crash-reporter-id aee5f446-7a8e-4acf-987b-b21f6e953eaf
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonvspyt551:30345470
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
vscscmwlcmt:30465135
cppdebug:30492333
pylanb8912:30520716
vsclangdc:30486549

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:9

github_iconTop GitHub Comments

2reactions
balotoficommented, Jul 24, 2022

Also please send a screenshot running using .\venv\Scripts\python.exe in terminal, I suspect the executable is likely not valid.

About this, can you send the screenshot. For example,

.\venv\Scripts\python.exe -c"import sys;print(sys.executable)"`

This is to make sure it is valid.

unable to do the output thing, i cleared it so i could do a new log and now everytime i change to debug and do steps to reproduce, it comes up empty

Try the Developer: Reload Window command and wait for extension to activate by opening a python file. Also for now, let’s forget about python.logging.level to debug. Screenshot (50)

1reaction
karrtikrcommented, Jul 29, 2022

Also please note we investigate issues in order based on priority and severity, which includes the impact it has on your ability to use the extension to do productive work, and the number of people affected. If other users come forward and leave a comment demonstrating they are seeing/reproducing the problem then we will raise this issue’s priority. Thanks for understanding and the patience!

Read more comments on GitHub >

github_iconTop Results From Across the Web

VS Code: Python Interpreter can't find my venv - Stack Overflow
When I try to set the Python Interpreter, it shows me only the Python installed in my machine and not the one in...
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 >
Cannot select python interpreter · Issue #3535 - GitHub
I downloaded a new version of python and now i cannot select the exe-file. If the error message appears i select the only...
Read more >
Configure a Python interpreter | PyCharm Documentation
Select Poetry Environment. · Choose the base interpreter from the list, or click Choose the base interpreter · If PyCharm doesn't detect the ......
Read more >
Manage Python environments and interpreters - Visual Studio ...
If no environments appear, it means Visual Studio failed to detect any Python installations in standard locations.
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