Pycharm 简明教程

Pycharm - Interpreters

PyCharm 包含解释器,可以使用新的特性创建新项目,就像需要的那样。您可以根据需要在系统中创建一个虚拟环境。您还可以在对话框中继承全局站点包。解释器可在 Python 包索引 (PyPI) 上获得,并且可以使用 pip install. 轻松安装和访问。

PyCharm includes interpreters to create a new project with new features as the way it is needed. You can create a virtual environment in your system as the way you need it. You can also inherit global site packages in the dialog box. Interpreters are available on Python Package Index (PyPI) and can be easily installed and accessed using pip install.

Creation of Interpreter

对于创建解释器,始终建议创建一个新项目,其中管理所需的配置。查看以下屏幕截图以更好地理解 −

For creating an interpreter, it is always recommended to create a new project where desired configurations are managed. Look at the following screenshot for a better understanding −

creation interpreter

这些参数包括 −

These parameters include −

  1. Location − This describes the parameter where virtual environment is created focusing on the location on system.

  2. Basic interpreter − It defines the attributes of interpreter.

该对话框还引用了将现有虚拟解释器作为属性的参数。一旦用户添加了一个新的本地解释器,PyCharm 将向用户询问解释器的二进制文件。在大多数情况下,它总是被认为是 .exe 文件。如果是 Jython,它将始终是 .bat 文件。

The dialog box also refers to the parameter where an existing virtual interpreter will be taken as an attribute. Once the user adds a new local interpreter, PyCharm will ask the user for the binary of interpreter. In most cases, it is always considered to be a .exe file. In case of Jython, it will be always a .bat file.

python intrepreter
untitled project

可以按如下所示查看项目解释器和现有项目 demo1 的基本配置的详细信息 −

The details of Project Interpreter and the basic configuration of the existing project demo1 can be seen as shown below −

project intrepreter

请记住,解释器还包括平稳运行项目所需的基本包。

Remember that the interpreter also includes the basic packages which are mandatory for smooth functioning of working of project.