Python interpreters in PyCharm
To work with your Python code in PyCharm, you need to configure at least one Python interpreter. You can use a system interpreter that is available with your Python installation. You can also create a Virtualenv, Pipenv, Poetry, or Conda virtual environment. A virtual environment consists of a base interpreter and the installed packages.
With PyCharm Professional, you can also configure interpreters to execute your Python code on remote environments by using SSH, Vagrant, Docker, Docker Compose, or WSL (only for Windows).
When you configure a Python interpreter, you need to specify the path to the Python executable in your system. So, before configuring a Python interpreter, you need to ensure that you’ve downloaded Python and installed it in your system and you’re aware of a path to it. You can create several Python interpreters based on the same Python executable. This is helpful when you need to create different virtual environments for developing different types of applications. For example, you can create one virtual environment based on Python 3.6 to develop Django applications and another virtual environment based on the same Python 3.6 to work with scientific libraries.
Python interpreters can be configured for a new project or for the current project (you can create a new interpreter or use one of the existing interpreters).
Configuring an existing Python interpreter
At any time, you can switch the Python interpreter either by using the Python Interpreter selector or in Settings.
Switch the Python interpreter using the Python Interpreter selector
-
The Python Interpreter selector is located on the status bar. It is the most convenient and quickest way to switch the Python interpreter. Just click it and select the target interpreter:
Switch the Python interpreter in the IDE settings
-
Press Ctrl+Alt+S to open the IDE settings and select .
-
Expand the list of the available interpreters and click Show All.
-
Select the target interpreter.
When PyCharm stops supporting any of the outdated Python versions, the corresponding Python interpreter is marked as unsupported.
When you change an SSH interpreter, you might need to synchronize the local content with the target server. Mind a notification balloon in the lower-right corner:
You can choose to perform one of the following actions:
-
Auto-upload files to the server
-
Synchronize files and then enable auto-uploading
Modify a Python interpreter
-
Press Ctrl+Alt+S to open the IDE settings and select .
-
Expand the list of the available interpreters and click Show All.
-
You can modify the path to the Python executable in the Interpreter path field.
To change the interpreter name, select the target interpreter and click .
The Python interpreter name specified in the Name field, becomes visible in the list of available interpreters. Click OK to apply the changes.
Remove a Python interpreter
If you no longer need a Python interpreter for a project, you can remove it from the project settings.
-
Do one of the following:
-
Press Ctrl+Alt+S to open the IDE settings and select .
-
Click the Python Interpreter selector and choose Interpreter Settings.
-
-
Expand the list of the available interpreters and click Show All.
-
Choose the interpreter that you want to remove and click .
Creating a new Python interpreter
Configuring local Python interpreters
To configure a local Python interpreter for the current project, follow one of the procedures below:
Configure a system interpreter
-
Ensure that you have downloaded and installed Python on your computer.
- Installing Python on Windows from Microsoft Store
-
If you are on Windows, you can download Python from the Microsoft Store and install it as a Python interpreter. Once the Python application is downloaded from the Microsoft Store, it becomes available in the list of the Python executables.
Note that interpreters added from the Microsoft Store installations come with some limitations. Because of restrictions on Microsoft Store apps, Python scripts may not have full write access to shared locations such as
TEMP
and the registry.
-
Do one of the following:
-
Click the Python Interpreter selector and choose Add New Interpreter.
-
Press Ctrl+Alt+S to open Settings and go to . Click the Add Interpreter link next to the list of the available interpreters.
-
Click the Python Interpreter selector and choose Interpreter Settings. Click the Add Interpreter link next to the list of the available interpreters.
-
-
Select Add Local Interpreter.
-
In the left-hand pane of the Add Python Interpreter dialog, select System Interpreter.
-
In the Interpreter field, type the fully-qualified path to the required interpreter executable, or click and in the Select Python Interpreter dialog that opens, choose the desired Python executable.
You will need admin privileges to install, remove, and upgrade packages for the system interpreter. When attempting to install an interpreter package through an intention action, you might receive the following error message:
As prompted, consider using a virtual environment for your project.
-
Click OK to complete the task.
For more information, see Configure a system interpreter.
Create a virtualenv environment
-
Do one of the following:
-
Click the Python Interpreter selector and choose Add New Interpreter.
-
Press Ctrl+Alt+S to open Settings and go to . Click the Add Interpreter link next to the list of the available interpreters.
-
Click the Python Interpreter selector and choose Interpreter Settings. Click the Add Interpreter link next to the list of the available interpreters.
-
-
Select Add Local Interpreter.
-
In the left-hand pane of the Add Python Interpreter dialog, select Virtualenv Environment.
-
The following actions depend on whether you want to create a new virtual environment or to use an existing one.
- New virtual environment
-
-
Specify the location of the new virtual environment in the Location field, or click and browse for the desired location in your file system. The directory for the new virtual environment should be empty.
-
Choose the base interpreter from the list, or click and find the desired Python executable in your file system.
-
Select the Inherit global site-packages checkbox if you want all packages installed in the global Python on your machine to be added to the virtual environment you’re going to create. This checkbox corresponds to the
--system-site-packages
option of the virtualenv tool.
-
- Existing virtual environment
-
-
Choose the desired interpreter from the list.
-
If the desired interpreter is not on the list, click , and then browse for the desired Python executable (for example, venv/bin/python on macOS or venvScriptspython.exe on Windows).
The selected virtual environment will be reused for the current project.
-
-
Click OK to complete the task.
For more information, see Configure a virtual environment.
Create a conda environment
-
Ensure that Anaconda or Miniconda is downloaded and installed on your computer, and you’re aware of a path to its executable file.
Refer to the installation instructions for more details.
-
Do one of the following:
-
Click the Python Interpreter selector and choose Add New Interpreter.
-
Press Ctrl+Alt+S to open Settings and go to . Click the Add Interpreter link next to the list of the available interpreters.
-
Click the Python Interpreter selector and choose Interpreter Settings. Click the Add Interpreter link next to the list of the available interpreters.
-
-
Select Add Local Interpreter.
-
In the left-hand pane of the Add Python Interpreter dialog, select Conda Environment.
-
The following actions depend on whether you want to create a new conda environment or to use an existing one.
- New conda environment
-
-
Select the Python version from the list.
-
Normally, PyCharm will detect conda installation.
Otherwise, specify the location of the conda executable, or click to browse for it.
-
Specify the environment name.
-
- Existing conda environment
-
-
Choose the desired environment from the list.
The selected conda environment will be reused for the current project.
-
-
Click OK to complete the task.
For more information, see Configure a conda virtual environment.
Create a pipenv environment
-
Do one of the following:
-
Click the Python Interpreter selector and choose Add New Interpreter.
-
Press Ctrl+Alt+S to open Settings and go to . Click the Add Interpreter link next to the list of the available interpreters.
-
Click the Python Interpreter selector and choose Interpreter Settings. Click the Add Interpreter link next to the list of the available interpreters.
-
-
Select Add Local Interpreter.
-
In the left-hand pane of the Add Python Interpreter dialog, select Pipenv Environment.
-
Choose the base interpreter from the list, or click and find the desired Python executable in your file system.
-
If you have added the base binary directory to your
PATH
environmental variable, you don’t need to set any additional options: the path to the pipenv executable will be autodetected.If the pipenv executable is not found, follow the pipenv installation procedure to discover the executable path, and then paste it in the Pipenv executable field.
-
Click OK to complete the task.
Once all the steps are done, the new pipenv environment is set for your project and the packages listed in the Pipfile are installed.
If you open a project with a Pipfile file added but no any interpreter configured, PyCharm offers you to use Pipenv environment.
If you select this option, PyCharm sets pipenv for you automatically. Alternatively, you can click Configure Python interpreter to follow the standard workflow.
Similarly, when you open a project with a Pipfile file in PyCharm for the very first time, for example, by checking it out from the Version Control, the Pipenv virtual environment will be configured automatically.
When you have set the Pipenv virtual environment as a Python interpreter, all available packages are added from the source defined in Pipfile . The packages are installed, removed, and updated in the list of the packages through pipenv rather than through pip.
For more information, see Configure a Pipenv environment.
Create a Poetry environment
-
Do one of the following:
-
Click the Python Interpreter selector and choose Add New Interpreter.
-
Press Ctrl+Alt+S to open Settings and go to . Click the Add Interpreter link next to the list of the available interpreters.
-
Click the Python Interpreter selector and choose Interpreter Settings. Click the Add Interpreter link next to the list of the available interpreters.
-
-
Select Add Local Interpreter.
-
In the left-hand pane of the Add Python Interpreter dialog, select Poetry Environment.
-
The following actions depend on whether you want to create a new Poetry environment or to use an existing one.
- New Poetry environment
-
-
Select Poetry Environment.
-
Choose the base interpreter from the list, or click and find the desired Python executable in your file system.
-
If PyCharm doesn’t detect the poetry executable, specify the following path in the Poetry executable field, replacing
jetbrains
with your username:/Users/jetbrains/Library/Application Support/pypoetry/venv/bin/poetry
C:UsersjetbrainsAppDataRoamingpypoetryvenvScriptspoetry.exe
/home/jetbrains/.local/bin/poetry
-
- Existing Poetry environment
-
-
Make sure that the project directory contains a pyproject.toml file.
-
Select Existing environment. Then expand the Interpreter list and choose the desired interpreter.
-
If the desired interpreter is not on the list, click, and then browse for the Python executable within the previously configured Poetry environment.
The selected Poetry environment will be reused for the current project.
-
-
Click OK to complete the task.
For more information, see Configure a Poetry environment.
Configuring remote Python interpreters
When a remote Python interpreter is added, at first the PyCharm helpers are copied to the remote host. PyCharm helpers are needed to run remotely the packaging tasks, debugger, tests and other PyCharm features.
Next, the skeletons for binary libraries are generated and copied locally. Also, all the Python library sources are collected from the Python paths on a remote host and copied locally along with the generated skeletons. Storing skeletons and all Python library sources locally is required for resolve and completion to work correctly.
PyCharm checks remote helpers version on every remote run, so if you update your PyCharm version, the new helpers will be uploaded automatically, and you don’t need to recreate remote interpreter. SFTP support is required for copying helpers to the server.
Configure a WSL interpreter
-
Do one of the following:
-
Click the Python Interpreter selector and choose Add New Interpreter.
-
Press Ctrl+Alt+S to open Settings and go to . Click the Add Interpreter link next to the list of the available interpreters.
-
Click the Python Interpreter selector and choose Interpreter Settings. Click the Add Interpreter link next to the list of the available interpreters.
-
-
Select On WSL.
-
Wait until PyCharm detects Linux on your machine and completes introspection. Press Next to proceed:
-
In the left-hand pane of the dialog, select the type of the WSL interpreter you want to create: Virtual Environment, Conda Environment, or System Interpreter.
For a system interpreter, just provide the path to the Python executable in the selected Linux distribution.
For virtual and conda environments, you can provide a path to a Python executable of an existing environment in the selected Linux distribution or create a new environment based on the specified Python.
Once done, the new interpreter will be added to your project, and the default mnt mappings will be set.
For more information, see Configure an interpreter using WSL.
Configure an interpreter using Vagrant
-
Ensure that the following prerequisites are met (outside of PyCharm):
-
One of supported Vagrant providers is installed on your computer.
-
Vagrant is installed on your computer, and all the necessary infrastructure is created.
-
The parent folders of the following executable files have been added to the system
PATH
variable:-
vagrant.bat or vagrant from your Vagrant installation. This should be done automatically by the installer.
-
VBoxManage.exe or VBoxManage from your Oracle’s VirtualBox installation.
-
-
The required virtual boxes are created.
-
-
Make sure that the Vagrant plugin is enabled.
-
Ensure that you have properly initiated and started Vagrant. Basically, you need to open the Terminal window and execute the following commands:
$ vagrant init ubuntu/trusty64
and
$ vagrant up
See Vagrant documentation for more information.
-
Do one of the following:
-
Click the Python Interpreter selector and choose Add New Interpreter.
-
Press Ctrl+Alt+S to open Settings and go to . Click the Add Interpreter link next to the list of the available interpreters.
-
Click the Python Interpreter selector and choose Interpreter Settings. Click the Add Interpreter link next to the list of the available interpreters.
-
-
Select On Vagrant.
-
Specify the path to the Vagrant instance folder in Vagrant Instance Folder.
Wait until you see a link in Vagrant Host URL.
-
In the New Target: Vagrant dialog, click the browse icon next to the Vagrant Instance Folder field, and specify the desired Vagrant instance folder.
This results in showing the link to Vagrant Host URL.
-
In the next field, PyCharm will display the path to the Python executable. Press «Next» to proceed.
-
You can create a virtual environment (venv or conda) or use a system Python interpreter for the target Vagrant instance. Note that virtual environment must be configured and available in the specified Vagrant instance folder. Otherwise, the corresponding lists will be empty.
Clik Create to complete the task.
For more information, see Configure an interpreter using Vagrant.
Configure an interpreter using SSH
-
Ensure that there is an SSH server running on a remote host, since PyCharm runs remote interpreters via ssh-sessions.
-
Do one of the following:
-
Click the Python Interpreter selector and choose Add New Interpreter.
-
Press Ctrl+Alt+S to open Settings and go to . Click the Add Interpreter link next to the list of the available interpreters.
-
Click the Python Interpreter selector and choose Interpreter Settings. Click the Add Interpreter link next to the list of the available interpreters.
-
-
Select On SSH.
-
Select an option to create a new SSH connection, then specify server information (host, port, and username).
Alternatively, you can select Existing and choose any available SSH configuration from the list. To create a new SSH configuration, follow the steps below:
- Creating an SSH configuration
-
-
Click next to the list of configurations:
-
Click, disable the Visible only for this project checkbox, and fill in the required fields:
-
Once done, the newly created SSH configuration will appear in the list of available configurations. It will also become available in the SSH Deployment Configurations settings. Click Next to proceed:
-
-
In the next dialog window, provide the authentication details to connect to the target server.
Select Password or Key pair (OpenSSH or PuTTY) and enter your password or passphrase. If Key pair (OpenSSH or PuTTY) is selected, specify:
-
Private key: location of the file with a private key
-
Passphrase: similar to a password, it serves to encrypt the private key.
Click Next to proceed.
-
-
Wait until PyCharm completes the introspection of the SSH server.
-
In the next dialog, select a type of Python environment to configure on the SSH server.
You can create a new virtual environment, select an existing one, or use a system interpreter.
-
Select the Inherit global site-packages checkbox if you want all packages installed in the global Python on your machine to be added to the virtual environment you’re going to create. This checkbox corresponds to the
--system-site-packages
option of the virtualenv tool. -
You can configure the path mappings between your local project and the server. To do that, click the Browse icon in the Sync folders field and enter the path to the local project folder and the path to the folder on the remote server.
Click Create to complete adding the interpreter.
-
For more information, see Configure an interpreter using SSH.
Configure an interpreter using Docker
-
Do one of the following:
-
Click the Python Interpreter selector and choose Add New Interpreter.
-
Press Ctrl+Alt+S to open Settings and go to . Click the Add Interpreter link next to the list of the available interpreters.
-
Click the Python Interpreter selector and choose Interpreter Settings. Click the Add Interpreter link next to the list of the available interpreters.
-
-
Select On Docker.
-
Select an existing Docker configuration in the Server dropdown.
Alternatively, select Create new and perform the following steps to create a new Docker configuration:
- Create a Docker configuration
-
Click New to add a Docker configuration and specify how to connect to the Docker daemon.
The connection settings depend on your Docker version and operating system. For more information, see Docker connection settings.
The Connection successful message should appear at the bottom of the dialog.
-
Select Pull to pull pre-built images from a Docker registry, and specify
python:latest
in the Image tag field. Alternatively, you can configure PyCharm to build images locally from a Dockerfile.Optionally, specify the docker build options.
-
Wait for PyCharm to connect to the Docker daemon and complete the container introspection.
-
Next, select an interpreter to use in the Docker container. You can choose any virtualenv or conda environment that is already configured in the container or select a system interpreter.
-
Click OK.
The configured remote interpreter is added to the list.
For more information, see Configure an interpreter using Docker.
Configure an interpreter using Docker Compose
-
Do one of the following:
-
Click the Python Interpreter selector and choose Add New Interpreter.
-
Press Ctrl+Alt+S to open Settings and go to . Click the Add Interpreter link next to the list of the available interpreters.
-
Click the Python Interpreter selector and choose Interpreter Settings. Click the Add Interpreter link next to the list of the available interpreters.
-
-
Select On Docker Compose.
-
Select an existing Docker configuration in the Server dropdown.
Alternatively, select Create new and perform the following steps to create a new Docker configuration:
- Create a Docker configuration
-
Click New to add a Docker configuration and specify how to connect to the Docker daemon.
The connection settings depend on your Docker version and operating system. For more information, see Docker connection settings.
The Connection successful message should appear at the bottom of the dialog.
-
In Configuration files, specify the docker-compose.yml file. Also select the service.
Optionally, specify environment variables.
-
Wait until PyCharm creates and configures a new target:
-
Next, select an interpreter to use in the container. You can choose any virtualenv or conda environment that is already configured in the container, or select a system interpreter.
-
Click OK.
The configured remote interpreter is added to the list.
For more information, see Configure an interpreter using Docker Compose.
Setting the default interpreter
In PyCharm, you can specify an interpreter that will be automatically set for all newly created projects.
-
From the main menu, select (on Window and Linux) or (on macOS).
-
Select Python Interpreter settings. Then either choose an existing interpreter from the Python interpreter list of click to add a new interpreter. Click OK to save the changes.
The change will become effective for all newly created projects in PyCharm.
Managing interpreter packages
For each interpreter, you can install, upgrade, and delete Python packages. By default, PyCharm uses pip to manage project packages. For Conda environments you can use the Conda package manager.
PyCharm smartly tracks the status of packages and recognizes outdated versions by showing the number of the currently installed package version (column Version), and the latest available version (column Latest version). When a newer version of a package is detected, PyCharm marks it with the arrow sign and suggests to upgrade it.
By default, the Latest version column shows only stable versions of the packages. If you want to extend the scope of the latest available versions to any pre-release versions (such as beta or release candidate), click Show early releases.
You can upgrade several packages at once. Hold Cmd (macOS) or Ctrl on (Unix or Windows), left-click to select several items in the list of packages, and then click Upgrade.
See the detailed instructions:
-
How to install a package
-
How to upgrade the package
-
How to uninstall the package
Last modified: 24 January 2023
Я пытаюсь изучить Python и решил использовать PyCharm. Когда я пытаюсь запустить новый проект, я получаю диалог, в котором говорится, что «Нет интерпретатора Python выбрано». У него есть раскрывающийся список, чтобы выбрать интерпретатор, но выпадающий пуст.
8 ответов
Вероятно, ваша проблема заключается в том, что вы не установили python. Это означает, что если вы используете Windows, вы не загрузили установщик для Windows, который вы можете найти на официальном сайте Python.
В случае, если у вас есть, есть вероятность, что PyCharm не сможет найти вашу установку Python, потому что она не находится в местоположении по умолчанию, обычно это C:Python27 или C:Python33 (для меня как минимум).
Итак, если вы установили Python и он все еще дает эту ошибку, то могут произойти две вещи:
- Вы используете virtualenv и этот virtualenv был удален или изменился путь к файлу. В этом случае вам нужно будет найти переход к следующей части этого ответа.
- Ваша установка python не находится по умолчанию, и в этом случае вам нужно будет найти ее местоположение и найти файл python.exe .
После того, как вы найдете необходимые бинарные файлы, вам нужно будет сказать, что PyCharm должны были выглядеть:
- Откройте диалог настроек CTRL + ALT + S
Затем вам нужно будет ввести interpreter в поле поиска:
Как вы можете видеть выше, вам нужно будет перейти к Project Interpreter а затем перейти к Python Interpreter . Местоположение выбрано для вас на приведенном выше изображении.
В стороне вы увидите несколько опций в виде значков, щелкните значок «Большая + , затем нажмите » local , потому что ваш интерпретатор находится на этом компьютере.
Как это исправить? «Ошибка: выберите допустимый интерпретатор Python»
Зайдите в Run-> Edit configurations затем выберите расположение интерпретатора Python для установленного Python ( python.exe ) затем после изменения примените изменения.
.
У меня была такая проблема. Я изменил имя своего модуля, но старое имя все еще сохранялось кое-где. Я исправил это в плагине Python для IntelliJ IDEA — удалил старый модуль и воссоздал его из источников — а затем он работал в PyCharm. Возможно, это можно было бы исправить в PyCharm, я просто переключал IDE из-за разочарования.
how to fix this ? «Error: Please select a valid Python interpreter»
Go to run->Edit configurations then select Python interpreter location of the python installed ( python.exe ) then after change apply the changes.
.
I had this problem. I had changed the name of my module, but the old name still persisted here and there. I fixed it in the Python plugin for IntelliJ IDEA — deleting the old module and recreating it from sources — and then it worked in PyCharm. It might have been possible to fix it in PyCharm, I was just switching IDEs out of frustration.
No python interpreter configured for the project
is a common error message you may encounter in PyCharm. PyCharm is a very useful editor having nice features like debugging, testing, refactoring and code completion. However, it needs an external interpreter (Python.exe) to run Python code.
This message tells you that project configuration should be updated to use a valid Python installation. To open the related configuration, you can click on Configure Python interpreter
link as shown below. Or alternatively, you can select File -> Settings from the menu and open Project -> Python Interpreter setting.
Python Interpreter setting shows that <No Interpreter> is selected for the project. To select (or create) a Python.exe interpreter click on Gear icon and select Show All… option.
In the Python Interpreters window that opens, the list is empty. To add a new Python Interpreter click on Plus (+) icon.
In Add Python Interpreter window, you can create a new virtual Python environment. My project is under C:abcstudyguidepython
directory, so I have created a folder venv
under this directory to create a new virtual environment for my project.
You must then choose a Base interpreter. Base interpreter is the python.exe file installed on your system. When you create a virtual environment, it will be based on Python version specified here. If you need a specific version of Python (like 3.8, 3.7), you need show path of this Python version in Base interpreter filed.
If you don’t have Python installed on your system yet, you can download it from https://www.python.org/downloads/. Note that I installed Python in C:PythonPython39
directory on my computer. However, default installation path is C:Users{YourUserName}AppDataLocalProgramsPython
.
Virtual Environments in Python
Instead of creating a new virtual environment, you can also use the System Interpreter, but this method is not recommended.
You can work on many different Python projects. Virtual environments are useful for creating an isolated environment for each Python project. Consider you are working on two different projects (ProjectA and ProjectB). Both projects are using the same library (LibraryX) but they require different versions of LibraryX. ProjectA needs version 1.0 of LibraryX, ProjectB needs version 2.0.
To avoid version conflicts between third party libraries, each project should create and use its own virtual environment instead of using System Interpreter (C:PythonPython39python.exe
).
When you create a new Python virtual environment and select it as Python Interpreter in your project settings, No python interpreter configured for the project
message will be gone.
In any stage, while doing python programming in Pycharm, we can encounter this error — “No python interpreter configured for this project.”
This error usually occurs when you are programming in Python and particularly using PyCharm IDE. To solve this error first you have to know what is Python and PyCharm.
Python is an interpreter that can be used to execute the python code
PyCharm is an integrated development environment used in computer programming, especially for the Python programming language(though other languages are also supported) that can display the output of your python programs in the console with the help of the installed python interpreter. PyCharm provides some best features to its users and developers in the following aspects.
- Code completion and inspection
- Advanced debugging
- Support for web programming and frameworks such as Django and Flask.
Now let’s come back to the solution.
Step 1: In the PyCharm window you can see the option of “Configure Python Interpreter” in the upper right corner.
Step 2: Click on this «Configure python interpreter» option. A settings window will appear in which the project interpreter will open.
You can also open a Project interpreter from the File option.
Go to File -> Settings -> Project -> Project Interpreter.
Step 3: In the “Project Interpreter” menu, you will get an option of selecting the project interpreter. I have a Python 3.6 project interpreter option because I am working with Python 3.6. Sometimes, there will be no option for a project interpreter. The reason can be either you have not installed python or your PyCharm is unable to locate a valid Python interpreter.
Step 4: Sometmies, you will not see a python interpretor in the dropdown, which means we need to guide pyhcharm on where the python interpreter is installed. To solve for this problem you can simply click on the “gear icon”.
Step 5: Click on “Add”.
Step 6: After this click on the “Existing Environment”.
Step 7: Then click on the “triple-dot” icon to locate python on your computer.
Note: You can follow the above steps only if you have installed python on your computer.
Step 8: If you don’t have Python then download and install it.
Now how to download and install python?
- Go to “Google Chrome”.
- Write “python install”.
You will find the home page of python.org. Here click on “Download Python 3.6.5” to download python.
Download the python interpreter and install it.
Step 9: 90% of the times, a python interpreter can be located automatically as was in my case. If you are able to find the python interpreter option in the dropdown, select and click on it.
Step 10: Click on the “Apply” button.
Step 11: Click “Ok”.
Now you can see that error is gone and you can happily work with your pycharm.
Step 12: After this, run any of your programs and the corresponding output will show up in the console.
I hope this article was helpful and you were able solve your error. Happy Coding!
You can also watch the following video if any of the above-mentioned steps are unclear. I am 100% sure that you will be able to solve error after following the instructions given in this article.
106 / 94 / 66 Регистрация: 21.04.2014 Сообщений: 1,337 |
|
1 |
|
Подключить интерпретатор21.01.2020, 20:08. Показов 57612. Ответов 1
Здравствуйте.
0 |
Programming Эксперт 94731 / 64177 / 26122 Регистрация: 12.04.2006 Сообщений: 116,782 |
21.01.2020, 20:08 |
Ответы с готовыми решениями: Интерпретатор в ОС Java Интерпретатор python Интерпретатор кода на Python Интерпретатор для PyCharm 1 |
19 / 14 / 6 Регистрация: 21.01.2020 Сообщений: 49 |
|
22.01.2020, 17:17 |
2 |
Когда интерпретатор не добавлен, выглядит всё примерно так: Вы должны нажать Ctrl+Alt+S для вызова настроек. В настройках необходимо выбрать слева Project Interpreter, далее справа от строки с таким же названием Project Interpreter нажать на шестеренку и выбрать Add Откроется окошко в котором нужно нажать ОК(если как вы говорите в консоли питон работает, значит Pycharm должен подхватить интерпретатор сам) Далее тоже ОК Спустя несколько секунд в правой нижней части увидите версию интерпретатора, можно работать
3 |
довольно неприятно, каждый раз, когда я загружаю существующий проект или создаю новый — он жалуется, что нет выбранного интерпретатора, и я должен предоставить путь к нему.
в моей установке python нет ничего необычного, она находится в C:/Python27 как и следовало ожидать. Он всегда работал, но последние несколько недель что-то изменилось.
Я запускаю Win7. Системная переменная PATH указывает на C:/Python27 как и должно быть.
Если я открою командная строка, команда python открывается так, как должна.
1 ответов
установка интерпретатора IDE по умолчанию исправила проблему, как упоминал Вадим. Найдены инструкции о том, как это сделать здесь.
эта конфигурация задает интерпретатор по умолчанию для новых проектов, обратите внимание на меню настроек по умолчанию, это не то же самое, что Файл / Настройки который задает параметры для текущего проекта.
Не совсем уверен, почему по умолчанию было отключено, но по крайней мере теперь я могу установить его снова. Проект настройка по умолчанию также была забыта, что любопытно, но проблема на другой день.
Спасибо, что помогли решить проблему за 14 минут, что заняло бы полдня траления через интернет или ожидания поддержки запросов.
Как выбрать интерпретатор python в PyCharm?
Доброго времени. Не понимаю, почему PyCharm не видит другие версии питона, хотя они установлены и именно из настроек самого PyCharm видны, а при создании конфигурации для проекта их уже нет.
Что я делаю не так?
- Вопрос задан более трёх лет назад
- 9995 просмотров
- Вконтакте
Смотрите в настройках проекта, а не настройках тестов
в сеттингах ищите django и название своего проекта
Settings
Project >:
— Project interpreter
- Вконтакте
Выбрал, но всё равно в проекте используется Python3.5
Please select a valid python interpreter pycharm что делать
All of a sudden Pycharm doesn’t run anymore (select valid interpreter)
- 0 Vote(s) — 0 Average
I’ve done a whole bunch of coding in Pycharm. Now all of a sudden it won’t run any of my Python files anymore. It pulled up this menu:
As you can see, it’s demanding that I select a valid Python interpreter. However, when I try to choose one from the drop-down list, the only thing available is «Project Default (none).»
What gives? This thing was working before. My coding files still run in Geany.
OS = Kubuntu Linux 16.04 LTS. I haven’t made any significant changes to the OS. I did install the trial version of a help authoring tool named HelpBlocks. I also needed to reinstall the Kubuntu software install library, Discover. That shouldn’t have affected Python’s availability in PyCharm.
Edit: Now that I think about it, I did allow Pycharm to update itself.
Second edit: I seem to have found the interpreter in the configuration and now it works. I guess the update must have deselected it.