An invalid python interpreter name python exe

Пытаясь заставить 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», как показано на скриншоте.

Источник

Как разрешить недопустимое имя интерпретатора Python «python.exe»! ошибка в PyCharm

Я пытаюсь добавить свой интерпретатор Python в PyCharm, но всякий раз, когда я перехожу к python.exe и нажимаю Ok, он говорит Invalid Python interpeter name ‘python.exe’! (орфографическая ошибка для interpeter заключается в том, как это пишется в появившемся диалоговом окне) Я установил Python через магазин приложений Microsoft. Интерпретатор находится в ~ \ AppData \ Local \ Microsoft \ WindowsApps \ python.exe. Это путь, по которому я перехожу при выборе интерпретатора в PyCharm. Есть также python3.exe и python3.7.exe, но они тоже не работают. Я могу запустить python из командной строки, и он ведет себя так, как ожидалось.

Читайте также:  HTML Link Color

На веб-странице MS указано, что она не полностью стабильна и все функции не работают. Почему бы просто не скачать с python.org и положить конец этому? — person probat &nbsp schedule 29.06.2019

Я загрузил установщик с python.org и указал PyCharm на этот интерпретатор. Теперь отлично работает. Надеюсь, в какой-то момент Microsoft / JetBrains разберутся с этим. — person indynt &nbsp schedule 04.07.2019

Ответы (4)

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

  • Откройте подсказку Windows
  • Перейдите в корень проекта: cd X: \ path \ to \ project
  • Введите python -m venv venv
  • Выберите существующий интерпретатор вместо создания нового venv с помощью Pycharm и выберите двоичный файл Python из virtualenv, который вы создали на предыдущем шаге.

Надеюсь, что это поможет, рад обновить это, чтобы добавить больше деталей, если нет.

Попробуйте сборку PyCharm 2019.2 EAP. Проблема должна быть исправлена: https://youtrack.jetbrains.com/issue/PY-33406 (или лучше использовать Python с python.org).

Я сообщил об опечатке в систему отслеживания ошибок PyCharm, спасибо https://youtrack.jetbrains.com/issue/PY-36686

Если кто-то еще сталкивается с этой проблемой, переустановка PyCharm помогла мне.

Источник

How to resolve «Invalid Python interpreter name ‘python.exe’!» error in PyCharm

Try PyCharm 2019.2 EAP build. The problem should be fixed: https://youtrack.jetbrains.com/issue/PY-33406 (or better use Python from python.org).

I reported the typo to PyCharm’s bug tracker, thanks https://youtrack.jetbrains.com/issue/PY-36686

Pavel Karateev 6935

In case anyone else is still facing this issue, reinstalling PyCharm did the trick for me.

Bikramjeet Singh 169

The EAP (Early Access Program) build Pavel suggests did not work for me. I hope this gets sorted out in PY-33406 as Pavel suggests.

In the responses for that issue, the thing that worked for me is included. I created a virtual environment using venv and was able to use that python interpreter. As it says on that page.

  • Open the windows prompt
  • Go to the project root: cd X:\path\to\project
  • Type python -m venv venv
  • Chose «existing interpreter» instead of creating a new venv using Pycharm and pick the Python binary from the virtualenv you created in the previous step

Hope that helps, happy to update this to add more detail if not.

Remove the interpreter (by using minus sign) and add it again!

Behrooz Ostadaghaee 53

I got the same error message when I imported a project of an existing virtual environment to pyCharm. Though the name and path of the exe was correct, pyCharm did not accept it. My solution was to remove the Interpreter in pyCharm and to add it again. Then the Error was gone. Perhaps that can help someone .

Читайте также:  Css rgba не работает
  • Pycharm Can’t run remote python interpreter error
  • invalid symlink error in pycharm python project
  • Python ValueError: Invalid header name b’:authority
  • How to have file name and line number in GAE Python logging.info logs?
  • Python Mechanize: how to select a dropdown list when two have the same name in web page?
  • How to generate python exe of a python script including other python scripts
  • How can I resolve PyCallGraphException: The command «dot -Tpng -failed with error code 256 error?
  • How to debug lxml.etree.XSLTParseError: Invalid expression error
  • How do I tell which Python interpreter I’m using?
  • python dictionary key error cannot resolve
  • Python code run error Need help. It gives error that «cannot import name ‘keys'»
  • How to convert two strings to give you a function name in Python
  • How to Install a Package in PyCharm when project interpreter is set to conda, and the package is not provided/listed by conda?
  • Invalid URL: No host supplied : error while using Request.get(url) in Python
  • Invalid syntax error in Python
  • How to get the name of attribute in python object?
  • How is generated the python grammar and how the interpreter understand it
  • How to Resolve Dash Bootstrap No_Gutter Type Error
  • How to access a python argparse argument with a dot in the name
  • How to “correctly” detect application name when changing focus event occurs with python xlib
  • Pycharm can’t change interpreter from python 2.7 to 3.4
  • python variable name resolve mechanism?
  • Python threading giving global name not defined error
  • How to resolve a python module import collision?
  • How to get current function name in Python C-API?
  • How can I resolve a circular import of two Python classes in the same module?
  • How can Python check if a file name is in UTF8?
  • PyCharm error — Error loading project: Cannot load facet Python
  • How to feed multiple inputs TFlite model in Python interpreter
  • Pybluex python bluetooth module installation error error in pycharm
  • how to insert to a mysql table using mysaldb, where the table name is in a python variable?
  • How to use Python 3.6 interpreter inside a bash script?
  • Datadog python api error INFO No agent or invalid configuration file found
  • How to tell, from within a running script, what Python interpreter is running it?
  • How to configure PyCharm to develop LibreOffice Python macros?
  • Python IRC 8.1.1 Invalid Syntax Error with class Connection(object, metaclass=abc.ABCmeta)?
  • How to suppress «index should be a string» type error on subclassed python enum
  • Using python unittest, how can I assert an error reported gave a certain message?
  • How to get the name of a selected Object Python Maya
  • python 3.5 asyncio how interpreter handles ‘suspended’ corutines
  • How to specify caller file name in python logger
  • python name error name not defined
  • ‘Invalid Python SDK’ error right after creating a new project in PyCharm
  • Python — pygame error when executing exe file
  • How to remedy «Segmentation fault (core dumped)» error when trying to fit a keras model in Python (Anaconda) on Ubuntu 18.04
  • How to configure Visual Studio Code in Windows 10 to disregard shebangs and use a Python interpreter path?
  • Python Cryptography Error cannot import name certificate_transparency
  • How to know HDF5 dataset name in python
  • How does the Python interpreter exit after finishing executing code?
  • How to display different error message with Python functions
Читайте также:  Javascript прекратить выполнение скрипта

More Query from same tag

  • Copy Text from Previously selected External application using button in python gui
  • Matplotlib.gridspec : how to specify the location by numbers?
  • Debugging modifications of sys.path
  • TypeError: expected string or bytes-like object while filtering the nested list of strings with RegEx
  • sort dict or list by second value of the tuple and then by the first one
  • Use Pandas to to read whitespace delimited triangular matrix with empty cells as zeros
  • Join table on itself to find user with same relationship
  • Button command being called automatically
  • Calculating float and storing to list gives weird value?
  • dataframe object is not callable in pyspark
  • running loop through two functions taking each others output as input
  • How to know if a Unicode identifier is valid?
  • What is the parameter copy_x in sklearn linear regression?
  • Python 3: How to call function from another file and pass arguments to that function ?
  • ssd_inception_v2 is not supported. See `model_builder.py` for features extractors compatible with different versions of Tensorflow
  • Scrapy Splash click button doesn’t work
  • Python: ‘self’ is missing (not automatically being passed) in object
  • How to find number of lines in text file using python?
  • Python C API: Problems trying to build a dictionary
  • Doing multiple, successive regex replacements in Python. Inefficient?
  • When I have inputs inside functions/methods, how can I test it?
  • SQLAlchemy join through JSON sub field
  • Why doesn’t python have built-in function mean()?
  • Reconnecting with pySerial
  • How to catch exceptions from botocore
  • Python find a string with single quote symbol in postgresql table
  • Check if String is Valid MySQL UTF8?
  • pyodbc.ProgrammingError: No results. Previous SQL was not a query, when executing multiple statements at once
  • Applying matplotlib color map to opencv image
  • Regex matching Python function calls
  • Get final resultant text of HTML
  • Install package with separate source directory in editable mode
  • How to get 64-bit value from WMI in python
  • how to generate a series of histograms on matplotlib?
  • How to organize this loop in a more elegant Pythonic way

Источник

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