positron icon indicating copy to clipboard operation
positron copied to clipboard

"No environment providers were found" for new Python project using New Project Wizard

Open mayrfb opened this issue 1 year ago • 3 comments

Screenshot 2024-08-07 170919 Type: Bug

When I try to set up a Python environment in Positron, No 'environment providers' are found using VenV . However, when I use Conda there is no problem. Can someone explain to me why this is happening?

VS Code version: Positron 1.91.0 (cae4905332a0f41a6233e196b48a6679b832000a, 2024-07-31T22:26:02.970Z) OS version: Windows_NT x64 10.0.26120 Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i9-9900 CPU @ 3.10GHz (16 x 3096)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
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_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 63.81GB (42.86GB free)
Process Argv
Screen Reader no
VM 0%
Extensions: none

mayrfb avatar Aug 07 '24 21:08 mayrfb

Hey @mayrfb, thanks for reaching out about this!

From your screenshot, it seems like something went wrong while trying to detect which existing Python installations you have on your machine. The Conda Project Wizard flow doesn't depend on existing python installations on your machine -- an appropriate version of python is downloaded as part of creating a new Conda environment.

Could you please share which versions of Python you have installed on your machine? You can take a screenshot of what shows up via the Command Prompt "Python: Select Interpreter" command.

Here's a short demo on how to do that:

  1. Ctrl + Shift + P to open the Command Prompt
  2. Type in python.setInterpreter and run the command
  3. Screenshot the list of interpreters that appear

https://github.com/user-attachments/assets/72a76c31-1ef3-44d9-8b4b-1f33ab54eed9

sharon-wang avatar Aug 08 '24 20:08 sharon-wang

Hi Sharon-Wang, Thank you for getting back to me so quickly. This is the list of interpreters following your instructions. image

mayrfb avatar Aug 08 '24 21:08 mayrfb

Thanks for sharing that! I can confirm that it's a bug in the Project Wizard -- we are not including Microsoft Store global python installs in the dropdown, so we'll need to fix that up.

In the meantime, here's a workaround to create a Venv 👇

Make sure you've already opened a folder in Positron, then you can do the following steps:

  1. Ctrl + Shift + P to open the Command Prompt
  2. Type in python create environment and run the command "Python: Create Environment..."
  3. Select the Venv option
  4. Select the version of python to use (in your case, you probably want to use the Python 3.11.9 64-bit (Microsoft Store) one!)
  5. Click Install in the Install Python package "ipykernel"?dialog

https://github.com/user-attachments/assets/902ba10b-f062-49df-8f29-56ea82f1f9b8

sharon-wang avatar Aug 09 '24 18:08 sharon-wang

QA Notes

MicrosoftStore-installed Python interpreters should now show in the Project Wizard interpreter dropdown.

  • PR: https://github.com/posit-dev/positron/pull/5502
  • related issue: https://github.com/posit-dev/positron/issues/5341

sharon-wang avatar Nov 26 '24 16:11 sharon-wang

Verified Fixed

Positron Version(s) : 2024.12.0-96 Workbench Version(s): OS Version(s) :

Test scenario(s)

New project finds python everytime

Link(s) to TestRail test cases run or created:

jonvanausdeln avatar Dec 02 '24 19:12 jonvanausdeln