最近在学习python,必然要先了解一下基本的开发工具,之前在使用pycharm的时候都是糊里糊涂的按照百度教程来,很疑惑新建项目的时候怎么选
实际上对于选择解释器interpreter 的时候有两个选择:
1.虚拟环境
2.早配置的解释器
2不必多说,就是我们配置的解释器python1,而1官方是这样阐述的
Python best practice is to create a virtualenv for each project. In most cases, PyCharm create a new virtual environment automatically and you don't need to configure anything. Still, you can preview and modify the venv options. Expand the Python Interpreter: New Virtualenv Environment node and select a tool used to create a new virtual environment. Let's choose Virtualenv tool, and specify the location of the environment and the base Python interpreter used for the new virtual environment.
If PyCharm detects no Python on your machine, it provides the following options:
Specify a path to the Python executable (in case of non-standard installation)
Download and install the latest Python versions from python.org
Install Python using the Command-Line Developer Tools (macOS only).
Python的最佳实践是为每个项目创建一个虚拟环境。在大多数情况下,PyCharm会自动创建一个新的虚拟环境,您不需要配置任何内容。尽管如此,您仍然可以预览和修改venv选项。展开Python解释器:新建Virtualenv环境节点,然后选择用于创建新虚拟环境的工具。让我们选择Virtualenv工具,并指定环境的位置和用于新虚拟环境的基本Python解释器。