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

Remove "Recommended" tag in create environment quickpick for interpreters #20260

Closed
rebornix opened this issue Nov 22, 2022 · 2 comments · Fixed by #20604
Closed

Remove "Recommended" tag in create environment quickpick for interpreters #20260

rebornix opened this issue Nov 22, 2022 · 2 comments · Fixed by #20604
Assignees
Labels
area-environments Features relating to handling interpreter environments author-verification-requested Issues potentially verifiable by issue author debt Covers everything internal: CI, testing, refactoring of the codebase, etc. needs PR Ready to be worked on verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@rebornix
Copy link
Member

rebornix commented Nov 22, 2022

Type: Bug

  • Create an empty folder and open in VS Code
  • Create a dev container from the official conda template Anaconda (Python 3)
  • Open the folder in dev container
  • Install Python and Jupyte prerelease
  • Switch kernel picker type to mru notebook.kernelPicker.type: "mru"
  • Open a notebook, click on the kernel picker
    • Select another kernel...
    • Local Python Environment
    • Create Python Environment
    • Venv

image

It now recommends /usr/bin/python3 and picking this one will lead to following error

Starting Pylance language server.
Jupyter provided interpreter path override: /opt/conda/bin/python
> conda run -n base --no-capture-output python ~/.vscode-server-insiders/extensions/ms-python.python-2022.19.13251009/pythonFiles/get_output_via_markers.py ~/.vscode-server-insiders/extensions/ms-python.python-2022.19.13251009/pythonFiles/printEnvVariables.py
Jupyter provided interpreter path override: /opt/conda/bin/python
Jupyter provided interpreter path override: /opt/conda/bin/python
Running Env creation script:  [
  '/usr/bin/python3',
  '/home/vscode/.vscode-server-insiders/extensions/ms-python.python-2022.19.13251009/pythonFiles/create_venv.py',
  '--git-ignore',
  '--install'
]
Traceback (most recent call last):
  File "/home/vscode/.vscode-server-insiders/extensions/ms-python.python-2022.19.13251009/pythonFiles/create_venv.py", line 136, in <module>

    main(sys.argv[1:])
  File "/home/vscode/.vscode-server-insiders/extensions/ms-python.python-2022.19.13251009/pythonFiles/create_venv.py", line 116, in main
    raise VenvError("CREATE_VENV.PIP_NOT_FOUND")
__main__.VenvError: CREATE_VENV.PIP_NOT_FOUND

[ERROR 2022-10-22 0:38:30.929]: Error while running venv creation script:  CREATE_VENV.PIP_NOT_FOUND
[ERROR 2022-10-22 0:38:30.929]: CREATE_VENV.PIP_NOT_FOUND
[ERROR 2022-10-22 0:44:24.577]: Virtual env creation requires an interpreter.
[ERROR 2022-10-22 0:45:47.119]: Virtual env creation requires an interpreter.
[ERROR 2022-10-22 0:48:28.883]: Virtual env creation requires an interpreter.

It recommends the global python interpreter but that one doesn't work due to missing pip. cc @DonJayamanne

Extension version: 2022.19.13251009
VS Code version: Code - Insiders 1.74.0-insider (fef85ea792f6627c83024d1df726ca729d8c9cb3, 2022-11-21T05:22:37.848Z)
OS version: Windows_NT x64 10.0.22623
Modes:
Sandboxed: Yes
Remote OS version: Linux x64 5.10.16.3-microsoft-standard-WSL2

System Info
Item Value
CPUs Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz (8 x 3600)
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) 31.93GB (14.09GB free)
Process Argv .\py-container\ --enable-proposed-api joyceerhl.vscode-pyolite --enable-proposed-api rebornix.better-jupyter-errors --enable-proposed-api donjayamanne.kusto --crash-reporter-id e73ca734-e67c-473d-8c47-80c5407fc859
Screen Reader no
VM 0%
Item Value
Remote Dev Container: Anaconda (Python 3)
OS Linux x64 5.10.16.3-microsoft-standard-WSL2
CPUs Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz (8 x 3600)
Memory (System) 15.60GB (14.11GB free)
VM 0%
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30422396
pythontb:30258533
pythonptprofiler:30281269
vshan820:30294714
pythondataviewer:30285072
vscod805:30301674
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30404738
cppdebug:30492333
vsclangdf:30492506
c4g48928:30535728
dsvsc012:30540252
pynewvextcfv2:30611228
pylantcb52:30590116
pyindex848:30611229
nodejswelcome1:30587009
gswce1:30602633
pyind779:30611226
dbltrim-noruby:30604474

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Nov 22, 2022
@eleanorjboyd eleanorjboyd added the area-environments Features relating to handling interpreter environments label Nov 22, 2022
@karrtikr
Copy link

It recommends the global python interpreter but that one doesn't work due to missing pip

We should probably remove the "Recommended" tag altogether in this case, and let the user choose the interpreter.

@karrtikr karrtikr changed the title Create Python Env failure with conda Remove "Recommended" tag in create environment quickpick for interpreters Dec 12, 2022
@karrtikr karrtikr removed their assignment Dec 12, 2022
@karrtikr karrtikr added debt Covers everything internal: CI, testing, refactoring of the codebase, etc. needs PR Ready to be worked on and removed triage-needed Needs assignment to the proper sub-team labels Dec 12, 2022
@karrtikr karrtikr added this to the February 2023 milestone Jan 31, 2023
@DonJayamanne DonJayamanne reopened this Feb 21, 2023
@DonJayamanne
Copy link

Oop, accidentally opened this issue.

@karthiknadig karthiknadig added verification-needed Verification of issue is requested author-verification-requested Issues potentially verifiable by issue author labels Feb 21, 2023
@karrtikr karrtikr added the verified Verification succeeded label Feb 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2023
wesm pushed a commit to posit-dev/positron that referenced this issue Mar 28, 2024
Merging upstream vscode-python from 2023-02-03 commit fe4c5f1e4ae069160514495a717ff46f4cd11a61

--------------------
Commit message for microsoft/vscode-python@fe4c5f1:

Add a button in prompt to check logs in case the selected interpreter is invalid (microsoft/vscode-python#20642)


--------------------
Commit message for microsoft/vscode-python@1538833:

Allow to select a Python2.7 interpreter (microsoft/vscode-python#20639)


--------------------
Commit message for microsoft/vscode-python@9271136:

Move `replaceAll` and `splitLines` out of string extensions. (microsoft/vscode-python#20626)

For microsoft/vscode-python#18871
--------------------
Commit message for microsoft/vscode-python@e743037:

Ensure editable install only when [build-system] is present `pyproject.toml` (microsoft/vscode-python#20625)

Fixes microsoft/vscode-python#20620
--------------------
Commit message for microsoft/vscode-python@b43bc25:

Do not recommend Python2 as an interpreter (microsoft/vscode-python#20628)


--------------------
Commit message for microsoft/vscode-python@ddc765e:

Fix wording in conda inherit env prompt (microsoft/vscode-python#20627)

Closes microsoft/vscode-python#19001
--------------------
Commit message for microsoft/vscode-python@401418a:

Ensure IDs of Conda environments without python does not change after python is installed (microsoft/vscode-python#20609)

Fixes microsoft/vscode-python#20176

As we're changing IDs we've to ensure the same environment in cache with
older ID is migrated to use the new one, this is already ensured here:
https://github.com/microsoft/vscode-python/blob/32f55109c976e66bf39e8da6aae0c9b6f5115df2/src/client/pythonEnvironments/base/locators/composite/envsCollectionCache.ts#L109
--------------------
Commit message for microsoft/vscode-python@92d2d85:

Fix test failures due to linting (microsoft/vscode-python#20617)

Fixes microsoft/vscode-python#20612
--------------------
Commit message for microsoft/vscode-python@d245a90:

Update to latest `jedi-language-server` (microsoft/vscode-python#20611)

Fixes microsoft/vscode-python#20606
--------------------
Commit message for microsoft/vscode-python@3fe7057:

new inactive discovery logic (microsoft/vscode-python#20566)

New pytest code in a currently inactive state. 
--------------------
Commit message for microsoft/vscode-python@bf4091e:

Skip windows store interpreters found via windows registry when discovering (microsoft/vscode-python#20613)

Closes microsoft/vscode-python#20603
--------------------
Commit message for microsoft/vscode-python@ec2af99:

Use `markdownDescription` for settings with markdown in description (microsoft/vscode-python#20600)

Fixes microsoft/vscode-python#20582
--------------------
Commit message for microsoft/vscode-python@7ca872e:

Add option to skip showing recommended interpreter in quick pick API (microsoft/vscode-python#20604)

Closes microsoft/vscode-python#20260
--------------------
Commit message for microsoft/vscode-python@184617e:

Check to ensure major version matches current year. (microsoft/vscode-python#20601)

Fixes microsoft/vscode-python#20466
--------------------
Commit message for microsoft/vscode-python@328e511:

Ensure dependency quick pick is not shown when user exits env creation. (microsoft/vscode-python#20605)

Fixes microsoft/vscode-python#20602
--------------------
Commit message for microsoft/vscode-python@7fb72b7:

Update main to next pre-release (microsoft/vscode-python#20598)


--------------------
Commit message for microsoft/vscode-python@2dd9287:

Set release candidate version. (microsoft/vscode-python#20597)


--------------------
Commit message for microsoft/vscode-python@b83aacb:

Update `debugpy` to v1.6.6 (microsoft/vscode-python#20596)


--------------------
Commit message for microsoft/vscode-python@93b0053:

Skip requirement files from `site-packages` or `__pypackages__` (microsoft/vscode-python#20573)

Fixes microsoft/vscode-python#20560

Lead-authored-by: Karthik Nadig <kanadig@microsoft.com>
Co-authored-by: Eleanor Boyd <eleanorboyd@microsoft.com>
Co-authored-by: Pete Farland <pete.farland@posit.co>
Co-authored-by: Kartik Raj <karraj@microsoft.com>
wesm pushed a commit to posit-dev/positron that referenced this issue Mar 28, 2024
Merging upstream vscode-python from 2023-02-03 commit fe4c5f1e4ae069160514495a717ff46f4cd11a61

--------------------
Commit message for microsoft/vscode-python@fe4c5f1:

Add a button in prompt to check logs in case the selected interpreter is invalid (microsoft/vscode-python#20642)


--------------------
Commit message for microsoft/vscode-python@1538833:

Allow to select a Python2.7 interpreter (microsoft/vscode-python#20639)


--------------------
Commit message for microsoft/vscode-python@9271136:

Move `replaceAll` and `splitLines` out of string extensions. (microsoft/vscode-python#20626)

For microsoft/vscode-python#18871
--------------------
Commit message for microsoft/vscode-python@e743037:

Ensure editable install only when [build-system] is present `pyproject.toml` (microsoft/vscode-python#20625)

Fixes microsoft/vscode-python#20620
--------------------
Commit message for microsoft/vscode-python@b43bc25:

Do not recommend Python2 as an interpreter (microsoft/vscode-python#20628)


--------------------
Commit message for microsoft/vscode-python@ddc765e:

Fix wording in conda inherit env prompt (microsoft/vscode-python#20627)

Closes microsoft/vscode-python#19001
--------------------
Commit message for microsoft/vscode-python@401418a:

Ensure IDs of Conda environments without python does not change after python is installed (microsoft/vscode-python#20609)

Fixes microsoft/vscode-python#20176

As we're changing IDs we've to ensure the same environment in cache with
older ID is migrated to use the new one, this is already ensured here:
https://github.com/microsoft/vscode-python/blob/32f55109c976e66bf39e8da6aae0c9b6f5115df2/src/client/pythonEnvironments/base/locators/composite/envsCollectionCache.ts#L109
--------------------
Commit message for microsoft/vscode-python@92d2d85:

Fix test failures due to linting (microsoft/vscode-python#20617)

Fixes microsoft/vscode-python#20612
--------------------
Commit message for microsoft/vscode-python@d245a90:

Update to latest `jedi-language-server` (microsoft/vscode-python#20611)

Fixes microsoft/vscode-python#20606
--------------------
Commit message for microsoft/vscode-python@3fe7057:

new inactive discovery logic (microsoft/vscode-python#20566)

New pytest code in a currently inactive state. 
--------------------
Commit message for microsoft/vscode-python@bf4091e:

Skip windows store interpreters found via windows registry when discovering (microsoft/vscode-python#20613)

Closes microsoft/vscode-python#20603
--------------------
Commit message for microsoft/vscode-python@ec2af99:

Use `markdownDescription` for settings with markdown in description (microsoft/vscode-python#20600)

Fixes microsoft/vscode-python#20582
--------------------
Commit message for microsoft/vscode-python@7ca872e:

Add option to skip showing recommended interpreter in quick pick API (microsoft/vscode-python#20604)

Closes microsoft/vscode-python#20260
--------------------
Commit message for microsoft/vscode-python@184617e:

Check to ensure major version matches current year. (microsoft/vscode-python#20601)

Fixes microsoft/vscode-python#20466
--------------------
Commit message for microsoft/vscode-python@328e511:

Ensure dependency quick pick is not shown when user exits env creation. (microsoft/vscode-python#20605)

Fixes microsoft/vscode-python#20602
--------------------
Commit message for microsoft/vscode-python@7fb72b7:

Update main to next pre-release (microsoft/vscode-python#20598)


--------------------
Commit message for microsoft/vscode-python@2dd9287:

Set release candidate version. (microsoft/vscode-python#20597)


--------------------
Commit message for microsoft/vscode-python@b83aacb:

Update `debugpy` to v1.6.6 (microsoft/vscode-python#20596)


--------------------
Commit message for microsoft/vscode-python@93b0053:

Skip requirement files from `site-packages` or `__pypackages__` (microsoft/vscode-python#20573)

Fixes microsoft/vscode-python#20560

Lead-authored-by: Karthik Nadig <kanadig@microsoft.com>
Co-authored-by: Eleanor Boyd <eleanorboyd@microsoft.com>
Co-authored-by: Pete Farland <pete.farland@posit.co>
Co-authored-by: Kartik Raj <karraj@microsoft.com>
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 author-verification-requested Issues potentially verifiable by issue author debt Covers everything internal: CI, testing, refactoring of the codebase, etc. needs PR Ready to be worked on verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants