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

Create environment prompt triggers #22079

Closed
3 tasks done
karthiknadig opened this issue Sep 25, 2023 · 6 comments
Closed
3 tasks done

Create environment prompt triggers #22079

karthiknadig opened this issue Sep 25, 2023 · 6 comments

Comments

@karthiknadig
Copy link
Member

karthiknadig commented Sep 25, 2023

Refs: #21965 #20133

Complexity: 2

Create Issue


Requirements:

  1. You need to have python installed on your system 3.8 or greater
  2. Install the latest pre-release of the python extension
  3. Set python.createEnvironment.trigger to prompt in user settings.

Verification

  1. Open a folder containing python file and at least one requirements.txt file.
  2. Ensure there are no .venv or .conda in the workspace.
  3. The selected python should be the system python (i.e., not a virtual environment)
  4. Open the python file and click on the run in terminal button at the top right corner in the editor
  5. you should see a prompt:
    image

Note: this will show up only once per session.

Re-load before trying other triggers: Try debug in terminal (using the command), or try launching a script in debug mode.
Also note: Once you create a .venv and delete it and select a global python before retrying.

@Tyriar
Copy link
Member

Tyriar commented Sep 26, 2023

I had trouble getting this to work: #22085

@karthiknadig
Copy link
Member Author

karthiknadig commented Sep 26, 2023

@Tyriar I have updated the instructions there is a setting that needs to be added.
Set python.createEnvironment.trigger to prompt in user settings.

@bhavyaus
Copy link

I don't see the prompt and my file is stuck on "Reactivating terminals..." #22087

@karthiknadig
Copy link
Member Author

@bhavyaus You can turn off experimentation by setting "python.experiments.optOutFrom": [], in the user settings and try again?

@bhavyaus
Copy link

That did the trick.

@bhavyaus bhavyaus removed their assignment Sep 26, 2023
@Tyriar Tyriar removed their assignment Sep 26, 2023
@rebornix rebornix assigned rebornix and unassigned alexdima Sep 26, 2023
@rebornix
Copy link
Member

Work as expected!

@rebornix rebornix removed their assignment Sep 26, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants