Configuring a Local Python Interpreter
配置本地Python解释器
How to set up a local Python interpreter for your project.
如何为您的项目设置本地Python解释器。
New Interpreter 新的解释器
When we’re talking about local interpreters, PyCharm lets us configure them in two main ways:
当我们谈论本地解释器时,PyCharm允许我们以两种主要方式配置它们:
You can select and use your system interpreter
您可以选择和使用您的系统解释器
Or you can create a virtual environment using virtualenv, Pipenv, Conda, or Poetry
或者,您可以使用virtualenv、Pipenv、Conda或Poetry创建虚拟环境
You just need to have a Python installation already setup on your local machine. PyCharm lets you select your interpreter at three different points.
你只需要在你的本地机器上安装一个Python。PyCharm允许您在三个不同的点选择解释器。
Firstly, you can select the interpreter when you create a new project. We already covered how to create a new project, but we skimmed the Python interpreter configuration.
首先,您可以在创建新项目时选择解释器。我们已经介绍了如何创建一个新项目,但我们略读了Python解释器配置。
When you create a new project, you need to choose between creating a new interpreter or selecting a previously configured interpreter. Let’s create a new one.
当你创建一个新的项目时,你需要在创建一个新的解释器和选择一个以前配置的解释器之间进行选择。让我们创建一个新的。
The first thing you