Skip to content

Commit ba3ea54

Browse files
authored
Updated setting up venv as pyvenv is being deprecated
As of Python 3.6 pyvenv has been deprecated in favour of python3 -m venv. Further changes may be required following resolution of discussion around setting up venv in a sub directory vs at the top level of the project.
1 parent ed2c8f2 commit ba3ea54

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

source/developers/development_environment.markdown

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,18 @@ $ nvm install node
4242

4343
#### {% linkable_title Setting up virtual environment (optional) %}
4444

45-
If you plan on providing isolation to your environment using [`venv`](https://docs.python.org/3.4/library/venv.html). You'll need to install the python3-venv package:
45+
If you plan on providing isolation to your environment using [`venv`](https://docs.python.org/3.4/library/venv.html). Within the `home-assistant` directory, create and activate your virtual environment.
46+
47+
If using Python < 3.6 `pyvenv` is the recommended method of setting up virtual environments, you'll need to install the `python3-venv` package.
4648
```bash
4749
$ sudo apt-get install python3-venv
50+
$ pyvenv venv
51+
$ source venv/bin/activate
4852
```
49-
Within the `home-assistant` directory, create and activate your virtual environment using the commands:
53+
54+
If using Python 3.6 `pyvenv` has been deprecated:
5055
```bash
51-
$ pyvenv venv
56+
$ python3 -m venv venv
5257
$ source venv/bin/activate
5358
```
5459

0 commit comments

Comments
 (0)