Skip to content

Delete and Re-create conda environments #22075

@karthiknadig

Description

@karthiknadig

Refs: #21828

Complexity: 3

Create Issue


Requirements:

  1. Have conda installed
  2. Latest version of python extension pre-release.

Verification:

Setup

  1. Create a folder with a myscript.py file in it. Content of the file does not matter.
  2. In the same folder create a .conda environment: conda create -p .conda python
  3. Open folder in VS Code
  4. Open myscript.py, this should activate the python extension.

Verify Re-create option

  1. Ensure you do the set up steps
  2. Run Python: Create Environment ... command
  3. Select conda from the options.
  4. Extension will detect existing conda environment and give you two options (re-create or use existing)
  5. Select re-create.
  6. This should delete the existing coda environment and re-create it.
  7. You should be able to see this in the logs.

Note: The delete can fail, but you should be able to see instructions in the logs about deleting it manually.

Verify Use Existing

  1. Ensure you do the set-up steps
  2. Run Python: Create Environment ... command
  3. Select use existing.
  4. Python extension should just select that environment.

Your folder structure should look like this:

workspace1
|- .conda (dir)
|- myscript.py

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions