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 does not check if .venv already exists #20027

Closed
brettcannon opened this issue Oct 17, 2022 · 1 comment
Closed

Create Environment does not check if .venv already exists #20027

brettcannon opened this issue Oct 17, 2022 · 1 comment
Assignees
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug

Comments

@brettcannon
Copy link
Member

Type: Bug

Behaviour

Expected vs. Actual

If .venv already exists, ask the user whether they want to stick with it or delete it to create a new one. You can't have multiple environments in the same directory due to being able to only have a single pyvenv.cfg file.

Steps to reproduce:

  1. Create an environment in .venv.
  2. Launch the extension.
  3. Run Create Environment to create an environment with a different Python version than what .venv already has.

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.10.4
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Venv
  • Value of the python.languageServer setting: Pylance
Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX

User Settings


languageServer: "Pylance"

linting
• enabled: false

formatting
• provider: "black"

testing
• autoTestDiscoverOnSaveEnabled: false

experiments
• optInto: ["All"]

Extension version: 2022.17.12871028
VS Code version: Code - Insiders 1.73.0-insider (7ef8e6b87a2a5a25ba1ef946bd1640ca3510956c, 2022-10-14T05:17:07.227Z)
OS version: Windows_NT x64 10.0.22621
Modes:
Sandboxed: Yes

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz (8 x 2112)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
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_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) undefined
Memory (System) 15.75GB (3.74GB free)
Process Argv C:\Users\brcan\OneDrive - Microsoft\Snippets\snippets.md --crash-reporter-id 2f8216b4-0af9-4bf4-a156-6cdcff01b0ab
Screen Reader no
VM 0%
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
vslsvsres303:30308271
pythonvspyl392:30422396
pythontb:30258533
pythonptprofiler:30281269
vshan820:30294714
pythondataviewer:30285072
vscod805cf:30301675
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30404738
cppdebug:30492333
vsclangdf:30492506
c4g48928:30535728
dsvsc012cf:30540253
pylantcb52:30590116
pyind367cf:30587848
vscccc:30564267
pyindex848:30577858
nodejswelcome1:30587009

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Oct 17, 2022
@karthiknadig karthiknadig added feature-request Request for new features or functionality area-environments Features relating to handling interpreter environments needs proposal Need to make some design decisions bug Issue identified by VS Code Team member as probable bug needs PR Ready to be worked on and removed triage-needed Needs assignment to the proper sub-team feature-request Request for new features or functionality needs proposal Need to make some design decisions labels Oct 18, 2022
@luabud
Copy link
Member

luabud commented Sep 8, 2023

#21829

@luabud luabud closed this as completed Sep 8, 2023
@github-actions github-actions bot removed the needs PR Ready to be worked on label Sep 8, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-environments Features relating to handling interpreter environments bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

4 participants