-
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
ImportError: Error importing plugin "vscode_pytest": No module named 'vscode_pytest' #24414
Comments
@talebia Can you check if the Then open the folder that starts with Make sure that this folder exists. If it does not exit, try uninstalling python extension, close all vscode instances, and reopen vs code and install python extension again. |
@karthiknadig I do seem to have it although slightly different version that above: |
I can set the env var and it works fine. though would I have to update it manually each time there's a new version? plus I'm not sure why it was not set in the first place.. |
@talebia You should not have to set this, it should set automatically. It looked like in the logs only |
Thanks for all the info above, very weird the env vars are not getting set correctly. @talebia could you describe your setup? ie are you on a remote machine, what type of machine you have, where is this folder you are running test discovery on located. I am seeing in your logs |
One thing to try that just came to mind- could you disable pytest and enable unittest instead and trying running discovery that way? To do so update your settings.json for your workspace:
now RELOAD the VS Code window (important step to make sure the setting gets updated correctly) then attempt to discover a unittest, which you can use this example if you don't have one.
see how that goes as unittest uses the same env var substitution but with some small changes |
Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off. Happy Coding! |
I'm having a similar issue with a portable embedded install. I'm using this https://github.com/jtmoon79/PythonEmbed4Win to leverage standalone Python execution with an embedded installer. I've set my Python path but vscode can't find the plugin. |
Hi @joetristano! How have you set your path? We made some changes to append to the path when you click to start a test run but given the changes you have made is the extension able to edit the path to include this addition? |
similar to 23192 I'm using python 3.10.10 and below are the logs:
Similarly can get around it by using something like this but not sustainable.
The text was updated successfully, but these errors were encountered: