Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Markdown
### Creating a Virtual Python Environment
```console
# Python 3
$ python3 -m venv env-_name
```
And that's just it. It is important to use the __venv__ module as others are deprecated. The name of the environment can be anything as it is just a directory name, however it is good practice to use names like __*env*__ or __*venv*__ or expand with these names.

### Activate The Virtual Environment
To activate the environment just created, navigate to the location where it was created, if not already there, and execute the following command:
```console
$ source env-_name/bin/activate
(env-_name): $
```
As a result of activation, the currently used shell should explicitly show the name of the environment being activated on the command line.

### Deactivate The Virtual Environment
After finishing work with the environment, it can be deactivated in the following way:
```console
(env_name): $ deactivate


Info
titleRemoving The Virtual Environment

Normally it is not necessary to remove the environment, but this can be achieved by simply deleting the env_name directory.