Skip to content
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

venv environments are not detected until folder is opened #21659

Closed
aayushkatariaa opened this issue Jul 19, 2023 · 15 comments
Closed

venv environments are not detected until folder is opened #21659

aayushkatariaa opened this issue Jul 19, 2023 · 15 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug triage-needed Needs assignment to the proper sub-team

Comments

@aayushkatariaa
Copy link

Environment data

  • VS Code version: 1.80.1 (User Setup)
  • Jupyter Extension version (available under the Extensions sidebar): v2023.6.1101941928
  • Python Extension version (available under the Extensions sidebar): v2023.12.0
  • OS (Windows | Mac | Linux distro) and version: Windows 10, V10.0.19045 Build 19045
  • Python and/or Anaconda version: 3.11.4
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
  • Jupyter server running: Local

Expected behaviour

Environments in the same folder are detected under select kernels

Actual behaviour

Only the system interpreter is detected

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. Create an ipynb file with some code in a folder and initialize a venv in the same.
  2. Try to open that file without opening the folder from your explorer.
Output for Jupyter in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Jupyter)


@aayushkatariaa aayushkatariaa added the bug Issue identified by VS Code Team member as probable bug label Jul 19, 2023
@DonJayamanne
Copy link

Than you for filling this issues, however the steps area not sufficient to replicate this issue
Please could you provide steps to repro issue

  • What use the folder structure like
  • Where is the ven in the folder
  • Can you see the env in the python interpreter list
  • What folder do you open in vscode?

@DonJayamanne DonJayamanne added the info-needed Issue requires more information from poster label Jul 19, 2023
@aayushkatariaa
Copy link
Author

  • This is the structure
    image
  • venv is inside the folder? not sure what is expected here
  • No, the environment does not show up in the interpreter list either
  • None, I open the file without opening any folder

@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-jupyter Jul 19, 2023
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jul 19, 2023
@karthiknadig karthiknadig removed the info-needed Issue requires more information from poster label Jul 19, 2023
@karrtikr
Copy link

Please provide the debug logs which can help diagnose the issue:

  • Run Developer: Set log level command

  • Select Python -> Select Trace

  • Run Developer: Reload Window command

  • Provide the output:

    Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

    XXX
    

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Jul 19, 2023
@aayushkatariaa
Copy link
Author

note that the company name has been changed due to privacy reasons along with some other minor edits
log.txt

@github-actions github-actions bot removed the info-needed Issue requires more information from poster label Jul 20, 2023
@karrtikr
Copy link

Does venv environments show up when using Python: Select Interpreter command?

@karrtikr
Copy link

Thanks for the bug report! 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!

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Jul 21, 2023
@aayushkatariaa
Copy link
Author

Does venv environments show up when using Python: Select Interpreter command?

As mentioned previously, no it does not

@github-actions github-actions bot removed the info-needed Issue requires more information from poster label Jul 21, 2023
@aayushkatariaa
Copy link
Author

aayushkatariaa commented Jul 21, 2023

Also this issue may also be related to #21633 although I'm not a 100% sure on that

@karrtikr
Copy link

Try to open that file without opening the folder from your explorer.

It seems to be that no workspace folder is opened, is that the case?

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Jul 21, 2023
@aayushkatariaa
Copy link
Author

Yeah

@github-actions github-actions bot removed the info-needed Issue requires more information from poster label Jul 21, 2023
@karrtikr
Copy link

You need a workspace folder to be opened for workspace specific environments to be discovered. There is no way for us to know which project to look for environments in otherwise.

@karrtikr
Copy link

Try 'File-> Open folder...' option

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Jul 21, 2023
@karrtikr
Copy link

Closing as this seems to be the intended behavior.

@karrtikr karrtikr closed this as not planned Won't fix, can't repro, duplicate, stale Jul 21, 2023
@aayushkatariaa
Copy link
Author

Try 'File-> Open folder...' option

You need a workspace folder to be opened for workspace specific environments to be discovered. There is no way for us to know which project to look for environments in otherwise.

So is it intended that environments that are present in such folders do not show up?

@github-actions github-actions bot removed the info-needed Issue requires more information from poster label Jul 31, 2023
@aayushkatariaa
Copy link
Author

Since it kind of limits functionality so i thought it'd at least look in the same folder as the opened file

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

4 participants