How can I add interpreter to PyCharm?

a 夏天 提交于 2019-12-02 05:37:53

问题


When I try to run code in editor,it says that there is no available interpreters.Please,help.How can I solve the problem?


回答1:


Just read the PyCharm's Docs.

https://www.jetbrains.com/pycharm/quickstart/configuring_interpreter.html

Step by step:

  1. Go to Settings.
  2. Go to the section Project Interpreter .
  3. Click on the plus (+) button and select the Local option.
  4. Search for the interpreter, in Linux it is used to be in /usr/bin/python or /usr/bin/pythonX.Y where X and Y are the version. In Windows, it is used to be in C:\python.
  5. Last step save the settings and you have configured the interpreter.

PD: If you are on Linux python is installed and if you are using Windows, you can download from here: https://www.python.org/downloads/windows/




回答2:


This page Configuring Python Interpreter tells all the information you need.

To configure Python virtual environment, follow these steps:

  1. In the Settings/Preferences dialog (⌘,), click Project Interpreter.
  2. Click gear icon and choose Add ....
  3. In the left-hand pane of this dialog, click the Virtual Environment node.
  4. Click OK to apply changes and close the dialog box.



回答3:


I think it's better to run this command

$ sudo apt-get install python3-distutils



来源:https://stackoverflow.com/questions/32768371/how-can-i-add-interpreter-to-pycharm

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!