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:
- Go to
Settings
. - Go to the section
Project Interpreter
. - Click on the plus (+) button and select the
Local
option. - 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 inC:\python
. - 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:
- In the Settings/Preferences dialog (⌘,), click Project Interpreter.
- Click gear icon and choose Add ....
- In the left-hand pane of this dialog, click the Virtual Environment node.
- Click OK to apply changes and close the dialog box.