This article will tell you how to install a python interpreter in the PyCharm project. Before start, you should make sure you had installed python on your system.
1. How To Install Python Interpreter In PyCharm.
1.1 On macOS.
- Open PyCharm IDE, I use PyCharm community edition with Anaconda plugin.
- Then click the PyCharm —> Preferences… menu item ( macOS) or Window —> Preferences menu item ( Windows OS ).
- In the popup Preferences window, click Project: Project-Name —> Project Interpreter menu item at the left panel. Then you can see there is no Project Interpreter that has been selected on the right panel.
- Click the Project Interpreter drop-down list on the right panel, then click Show All… item, it will pop up the Project Interpreters dialog window.
- There is a default PyCharm python interpreter in the dialog. You can select it as the project python interpreter.
- If you want to install another Python interpreter, you can click the plus button ( + ) at the bottom left corner of the Project Interpreters popup dialog window. Then it will popup Add Python Interpreter window. You can select the python interpreter type from the left pane as you need.
- After you select one python interpreter in PyCharm, it will list all the modules package and version information that has been installed in that interpreter in the Preferences window, you can code and run your python program with that python interpreter.
1.2 On Windows.