-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing package hints raised in error on requirements.txt #22868
Comments
Hi @philipnye, can you ensure you have the right selected interpreter in the workspace (the one that has the installed requirements)? You can check the status bar on the bottom right and click on the version information to find the right one: |
Hi @luabud, I can confirm that I do. I don't get any missing package messages on my scripts, and the scripts run fine using that packages - it's just |
@philipnye Can you do a |
@karthiknadig Thanks.
I'd been wondering whether this might be to do with the fact that python is installed in |
@philipnye You can see the script of what it does here: It uses The script should be located at
|
@karthiknadig Thanks. Running that returns an empty list - which I think indicates all of the packages could be found? |
That is correct. So, in the output python logs do you see an entry for this |
@karthiknadig Sorry, where do I find the logs? |
@karthiknadig Gotcha, thanks (I'd been running These are my logs:
|
This is really strange, it seems to be using the exact same python with same conditions, and somehow not able to find Different question, is there any reason for not using a virtual environment? |
Thanks (I think it's not able to find any of the packages - I get the hint on all five of them).
I've had problems using virtual environments on OneDrive due to the large number of files involved, so I don't use them in all projects. |
I am able to repro this issue. Looks like it only occurs if shell execute is turned off when running something from node. Basically, user site packages are not included. From the docs it looks like it is intentional, but I need to dig more and see why this happens. |
Figured out the issue, created a PR. |
Hi @philipnye are you able to verify if this fix works? You can do so by trying on the pre-release of the python extension on vscode insiders. Thanks! |
@eleanorjboyd are there verification steps here if they don't get back to us in time? |
ope, just realized @karthiknadig fixed this. Same question to you ^ 😄 |
@TylerLeonhardt - Karthik is gone on vacation so he won't be able to provide steps. I understand most of it other than |
Removed the |
Verified the original comment is now fixed. |
Type: Bug
Behaviour
Open a project that does not have an associated virtual environment - i.e. my system-wide Python installation is the interpreter.
View
requirements.txt
, which contains the following:Missing package hints are raised for all packages, despite them being installed. Hints are e.g.
Expected
No missing package hints are raised.
Extension version: 2024.0.1
VS Code version: Code 1.86.0 (05047486b6df5eb8d44b2ecd70ea3bdf775fd937, 2024-01-31T10:28:19.990Z)
OS version: Windows_NT x64 10.0.19045
Modes:
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: