Issue
I have Python 3.7 64bit, Anaconda3, and Visual Studio Community 2019 installed on my system. I created a Python project in Visual Studio. Both those Python installations are recognized by Visual Studio.
In the Solution Explorer, I tried to create a Virtual Environment by right clicking on Python Environment and then clicking on Add Environment.
However, in the Add Environment window, in the Virtual Environment section, it shows "You will need to install a Python interpreter before creating a virtual environment." In the same window, in the Python installation section, it shows Python 3 64-bit as one of the already installed environments.
Why is Visual Studio not allowing to create VirtualEnv from the detected Python installation? How to solve this problem?
Solution
I had a similar issue, and believe I have a workaround.
Try running Visual Studio Installer (click the Windows button and start typing 'Visual Studio Installer', you should see it), and then "Repair" your installation -- the option is under the "More" button/drop-down.
Unfortunately, if you have a lot of features installed, this could take some time to complete. After the repair try reloading your solution and creating the VirtualEnv...it should work.
Answered By - Jay McLain Answer Checked By - Mildred Charles (WPSolving Admin)