简体   繁体   中英

Pycharm can't find the Interpreter

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:

图片1

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" :

图2

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 .

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.

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).

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.

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM