问题
I downloaded the student version of Pycharm from https://www.jetbrains.com/de-de/community/education/#students. We use Anaconda and Open CV as a package manager and basic library.
I have a problem with the interpreter. I open a new project and select "Pure Python" and under the bar "new environment using Virtualenv". The paths for location and base interpreter were already entered:
When I next click on "Create" an error message appears, which says "Python was not found but can be installed from the Microsoft Store: https://go.microsoft.com/fwlink?linkID=2082640":
And when I write a program and click "run" the same message appears.
The same problem was described in the English forums. The path of the executable could be important if I got that right. The executable is saved under AppData \ Local \ Microsoft \ WindowsApps
. I can't move that either. I did everything as my professor did before, only for him the executable was not saved under "Windows Apps" but normally under Programs \ Python \ Python.exe
.
回答1:
You are trying to create a virtual environment using AppData\Local\Microsoft\WindowsApps\python.exe
as a base interpreter but it is not a real Python interpreter it is a some sort of a Windows specific shortcut which suggests to install Python from Windows store.
If I recall correctly modern PyCharm is smart enough not to suggest this "fake" interpreter as a base for a virtual environment so make sure you are using the latest IDE version available.
We use Anaconda and Open CV as a package manager and basic library
If you have Anaconda installed - select it from existing interpreters
... or create a conda environment as darcamo suggests.
only for him the executable was not saved under "Windows Apps" but normally under Programs \ Python \ Python.exe
Your professor is using Python installed from python.org, which you can also install if you don't want to use conda. 3.8.6 should be a decent choice.
回答2:
If you are using anaconda, then choose "conda" as the environment type instead of "virtualenv". You can also choose an existing interpreter if you already create the environment in conda (or if you want to use the base environment that is already created when you install anaconda).
回答3:
i have attached ss for creating conda enviroment.
make sure that your giving correct path of conda.exe
its present in H:\anaconda\Scripts\conda.exe
your anaconda installed directory.
来源:https://stackoverflow.com/questions/64522786/pycharm-cant-find-the-interpreter