Merge pull request #1902 from lorderikir/docs/python-environments

doc: added documentation on python extension
This commit is contained in:
Kraig Brockschmidt 2018-10-02 00:06:30 +00:00 коммит произвёл GitHub
Родитель 5450eeceb3 6fc59d65ed
Коммит 95d2def725
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -24,6 +24,8 @@ The selected environment is also automatically activated when using the **Python
By default, any Python interpreter that you've installed run in its own "global" environment, which is not specific to any one program. For example, if you just run `python` (Windows) or `python3` (macOS/Linux) at a new command prompt, you're running in that interpreter's global environment. Accordingly, any packages that you install or uninstall affect the global environment and all programs that you run within that context.
> **Note**: The Python Extension version 2018.8.1 and later automatically updates environments. To disable automatic updating, add `"python.terminal.activateEnvironment": false` to your `settings.json` file.
Although working in the global environment is an easy way to get started, that environment will, over time, become cluttered with many different packages that you've installed for different projects. Such clutter makes it difficult to thoroughly test an application against a specific set of packages with known versions, which is exactly the kind of environment you'd set up on a build server or web server.
For this reason, developers often create a *virtual environment* for any given project. A virtual environment is a subfolder in a project that contains a copy of a specific interpreter. When you activate the virtual environment, any packages you install are installed only in that environment's subfolder. When you then run a Python program within that environment, you know that it's running against only those specific packages.