We didn find any interpreters python

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

«Python not installed» diagnostic despite showing an interpreter in the status bar #11870

«Python not installed» diagnostic despite showing an interpreter in the status bar #11870

area-environments Features relating to handling interpreter environments bug important users impacted; must be fixed prior to next release info-needed regression Bug didn’t exist in a previous release

Comments

Environment data

  • VS Code version: 1.45.1
  • Extension version (available under the Extensions sidebar): 2020.5.78807
  • OS and version: Catalina 10.15.4
  • Python version (& distribution if applicable, e.g. Anaconda): 3.8.0
  • Type of virtual environment used (N/A | venv | virtualenv | conda | . ): venv
Читайте также:  Php connection mysql utf8

Expected behaviour

Be able to create a folder or workspace for Python projects.

Actual behaviour

Popup error saying that Python is not installed.

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

I just started using VSCode. I installed the Python Extension (2020.5.78807). I have python 3.8.0 installed. I can confirm that by running python —version in the terminal in VSCode. The interpreter in the bottom left of the screen shows as 3.8.0. Command pallet shows the same interpreter.

I can create a new file and save it as a .py and it works with no issues. However, if I create a folder or a workspace and then create a file in that, I get a popup saying that Python is not installed (source: Python(Extension).

The code still seems to run ok. I tried uninstalling and reinstalling the extension but no luck. Any thoughts on how I can get rid of this error?

The text was updated successfully, but these errors were encountered:

@kimadeline thank you for the response.

  • I installed python using Homebrew
  • I normally click open folder on the welcome screen in VSCode. Then navigate to Documents and click create new folder on the bottom left of the directory selection popup and create a new folder. Then I create a .py file in that that folder in VSCode and get the error.
  • I rolled back to 2020.4.76186 on the extension but still getting the error

Here is the output for python. Quick note — I have started using Conda instead of Venv since the original post.

User belongs to experiment group 'AlwaysDisplayTestExplorer - control' User belongs to experiment group 'ShowPlayIcon - start' User belongs to experiment group 'ShowExtensionSurveyPrompt - enabled' User belongs to experiment group 'DebugAdapterFactory - experiment' User belongs to experiment group 'PtvsdWheels37 - experiment' User belongs to experiment group 'UseTerminalToGetActivatedEnvVars - control' User belongs to experiment group 'AA_testing - control' User belongs to experiment group 'WebHostNotebook - control' User belongs to experiment group 'LocalZMQKernel - control' User belongs to experiment group 'NativeNotebook - control' User belongs to experiment group 'CollectLSRequestTiming - control' User belongs to experiment group 'CollectNodeLSRequestTiming - experiment' User belongs to experiment group 'EnableIPyWidgets - experiment' User belongs to experiment group 'RunByLine - control' > conda --version > pyenv root > python3.7 ~/.vscode/extensions/ms-python.python-2020.5.78807/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)" > python3.6 ~/.vscode/extensions/ms-python.python-2020.5.78807/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)" > python3 ~/.vscode/extensions/ms-python.python-2020.5.78807/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)" > /usr/local/anaconda3/bin/python ~/.vscode/extensions/ms-python.python-2020.5.78807/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)" > python ~/.vscode/extensions/ms-python.python-2020.5.78807/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)" > python2 ~/.vscode/extensions/ms-python.python-2020.5.78807/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)" Starting Jedi Python language engine. Diagnostic Code: NoPythonInterpretersDiagnostic, Message: Python is not installed. Please download and install Python before using the extension. Python interpreter path: /usr/local/anaconda3/bin/python > conda info --json > conda info --json > conda info --json > conda info --json > /usr/local/anaconda3/bin/python ~/.vscode/extensions/ms-python.python-2020.5.78807/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.prefix)" cwd: ~/Documents/VSCode/test2 > /usr/local/anaconda3/bin/python ~/.vscode/extensions/ms-python.python-2020.5.78807/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.prefix)" cwd: ~/Documents/VSCode/test2 > /usr/local/anaconda3/bin/python ~/.vscode/extensions/ms-python.python-2020.5.78807/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)" cwd: ~/Documents/VSCode/test2 > /usr/local/anaconda3/bin/python ~/.vscode/extensions/ms-python.python-2020.5.78807/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)" cwd: ~/Documents/VSCode/test2 > /usr/local/anaconda3/bin/python ~/.vscode/extensions/ms-python.python-2020.5.78807/pythonFiles/pyvsc-run-isolated.py -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())" cwd: ~/Documents/VSCode/test2 > /usr/local/anaconda3/bin/python ~/.vscode/extensions/ms-python.python-2020.5.78807/pythonFiles/pyvsc-run-isolated.py -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())" cwd: ~/Documents/VSCode/test2 > /usr/local/anaconda3/bin/python ~/.vscode/extensions/ms-python.python-2020.5.78807/pythonFiles/pyvsc-run-isolated.py site --user-site cwd: ~/Documents/VSCode/test2 > /usr/local/anaconda3/bin/python ~/.vscode/extensions/ms-python.python-2020.5.78807/pythonFiles/pyvsc-run-isolated.py site --user-site cwd: ~/Documents/VSCode/test2 > /usr/local/anaconda3/bin/python ~/.vscode/extensions/ms-python.python-2020.5.78807/pythonFiles/pyvsc-run-isolated.py flake8 --max-line-length=120 "--ignore=F401, F841" --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s ~/Documents/VSCode/test2/main.py cwd: ~/Documents/VSCode/test2 > /usr/local/anaconda3/bin/python ~/.vscode/extensions/ms-python.python-2020.5.78807/pythonFiles/pyvsc-run-isolated.py flake8 --max-line-length=120 "--ignore=F401, F841" --format=%(row)d,%(col)d,%(code).1s,%(code)s:%(text)s ~/Documents/VSCode/test2/main.py cwd: ~/Documents/VSCode/test2 > conda env list > /usr/local/anaconda3/bin/python ~/.vscode/extensions/ms-python.python-2020.5.78807/pythonFiles/pyvsc-run-isolated.py ~/.vscode/extensions/ms-python.python-2020.5.78807/pythonFiles/completion.py > /usr/local/anaconda3/bin/python ~/.vscode/extensions/ms-python.python-2020.5.78807/pythonFiles/pyvsc-run-isolated.py ~/.vscode/extensions/ms-python.python-2020.5.78807/pythonFiles/completion.py ##########Linting Output - flake8########## > conda env list > /usr/local/anaconda3/bin/python ~/.vscode/extensions/ms-python.python-2020.5.78807/pythonFiles/pyvsc-run-isolated.py -c "import notebook" > /usr/local/anaconda3/bin/python ~/.vscode/extensions/ms-python.python-2020.5.78807/pythonFiles/pyvsc-run-isolated.py -c "import jupyter" > /usr/local/anaconda3/bin/python ~/.vscode/extensions/ms-python.python-2020.5.78807/pythonFiles/pyvsc-run-isolated.py jupyter kernelspec --version 

Источник

Пытаясь заставить PyCharm работать, продолжайте получать «Не выбран интерпретатор Python»

Я пытаюсь изучить Python и решил использовать PyCharm. Когда я пытаюсь запустить новый проект, я получаю диалог, в котором говорится, что «Нет интерпретатора Python выбрано». У него есть раскрывающийся список, чтобы выбрать интерпретатор, но выпадающий пуст.

8 ответов

Вероятно, ваша проблема заключается в том, что вы не установили python. Это означает, что если вы используете Windows, вы не загрузили установщик для Windows, который вы можете найти на официальном сайте Python.

В случае, если у вас есть, есть вероятность, что PyCharm не сможет найти вашу установку Python, потому что она не находится в местоположении по умолчанию, обычно это C:\Python27 или C:\Python33 (для меня как минимум).

Итак, если вы установили Python и он все еще дает эту ошибку, то могут произойти две вещи:

  1. Вы используете virtualenv и этот virtualenv был удален или изменился путь к файлу. В этом случае вам нужно будет найти переход к следующей части этого ответа.
  2. Ваша установка python не находится по умолчанию, и в этом случае вам нужно будет найти ее местоположение и найти файл python.exe .

После того, как вы найдете необходимые бинарные файлы, вам нужно будет сказать, что PyCharm должны были выглядеть:

Изображение 121464

  1. Откройте диалог настроек CTRL + ALT + S
  2. Затем вам нужно будет ввести interpreter в поле поиска:
  3. Как вы можете видеть выше, вам нужно будет перейти к Project Interpreter а затем перейти к Python Interpreter . Местоположение выбрано для вас на приведенном выше изображении.
  4. В стороне вы увидите несколько опций в виде значков, щелкните значок «Большая + , затем нажмите » local , потому что ваш интерпретатор находится на этом компьютере.
  5. Это откроет диалоговое окно. Обязательно выберите файл python.exe этого каталога, не дайте pycharm весь каталог. Он просто хочет переводчика.

Спасибо за решение. Я просто хотел сказать, что пользователь должен hide the taskbar on windows , чтобы увидеть кнопку ok 🙂

Здесь нет virtualenv , и python также устанавливается в папку по умолчанию. Все еще была эта проблема. Ответ здесь помог мне понять, где он работает, однако мне пришлось перезапустить pycharm, чтобы внести изменения по какой-то странной причине.

Это не работает с Ubuntu 16.04, PyCharm edition 2017.2.1. В разделе «Интерпретатор проекта» нет даже «Python Interpreters», как показано на скриншоте.

Источник

[Solved] No python interpreter configured for the project

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 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:\abcstudyguide\python 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:\Python\Python39 directory on my computer. However, default installation path is C:\Users\\AppData\Local\Programs\Python .

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:\Python\Python39\python.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.

Источник

Оцените статью