Skip to content

Commit d45d73b

Browse files
cojencoparthea
andauthored
docs: update README to use builtin venv (#1812)
Co-authored-by: Anthonios Partheniou <[email protected]>
1 parent 2d2d5e5 commit d45d73b

File tree

2 files changed

+22
-24
lines changed

2 files changed

+22
-24
lines changed

synthtool/gcp/templates/python_library/README.rst

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,16 @@ In order to use this library, you first need to go through the following steps:
3636
Installation
3737
~~~~~~~~~~~~
3838

39-
Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to
40-
create isolated Python environments. The basic problem it addresses is one of
41-
dependencies and versions, and indirectly permissions.
39+
Install this library in a virtual environment using `venv`_. `venv`_ is a tool that
40+
creates isolated Python environments. These isolated environments can have separate
41+
versions of Python packages, which allows you to isolate one project's dependencies
42+
from the dependencies of other projects.
4243

43-
With `virtualenv`_, it's possible to install this library without needing system
44+
With `venv`_, it's possible to install this library without needing system
4445
install permissions, and without clashing with the installed system
4546
dependencies.
4647

47-
.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/
48+
.. _`venv`: https://docs.python.org/3/library/venv.html
4849

4950

5051
Code samples and snippets
@@ -77,21 +78,19 @@ Mac/Linux
7778

7879
.. code-block:: console
7980
80-
pip install virtualenv
81-
virtualenv <your-env>
81+
python3 -m venv <your-env>
8282
source <your-env>/bin/activate
83-
<your-env>/bin/pip install {{ metadata['repo']['distribution_name'] }}
83+
pip install {{ metadata['repo']['distribution_name'] }}
8484
8585
8686
Windows
8787
^^^^^^^
8888

8989
.. code-block:: console
9090
91-
pip install virtualenv
92-
virtualenv <your-env>
93-
<your-env>\Scripts\activate
94-
<your-env>\Scripts\pip.exe install {{ metadata['repo']['distribution_name'] }}
91+
py -m venv <your-env>
92+
.\<your-env>\Scripts\activate
93+
pip install {{ metadata['repo']['distribution_name'] }}
9594
9695
Next Steps
9796
~~~~~~~~~~

synthtool/gcp/templates/python_mono_repo_library/README.rst

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,16 @@ In order to use this library, you first need to go through the following steps:
3636
Installation
3737
~~~~~~~~~~~~
3838

39-
Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to
40-
create isolated Python environments. The basic problem it addresses is one of
41-
dependencies and versions, and indirectly permissions.
39+
Install this library in a virtual environment using `venv`_. `venv`_ is a tool that
40+
creates isolated Python environments. These isolated environments can have separate
41+
versions of Python packages, which allows you to isolate one project's dependencies
42+
from the dependencies of other projects.
4243

43-
With `virtualenv`_, it's possible to install this library without needing system
44+
With `venv`_, it's possible to install this library without needing system
4445
install permissions, and without clashing with the installed system
4546
dependencies.
4647

47-
.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/
48+
.. _`venv`: https://docs.python.org/3/library/venv.html
4849

4950

5051
Code samples and snippets
@@ -77,21 +78,19 @@ Mac/Linux
7778

7879
.. code-block:: console
7980
80-
pip install virtualenv
81-
virtualenv <your-env>
81+
python3 -m venv <your-env>
8282
source <your-env>/bin/activate
83-
<your-env>/bin/pip install {{ metadata['repo']['distribution_name'] }}
83+
pip install {{ metadata['repo']['distribution_name'] }}
8484
8585
8686
Windows
8787
^^^^^^^
8888

8989
.. code-block:: console
9090
91-
pip install virtualenv
92-
virtualenv <your-env>
93-
<your-env>\Scripts\activate
94-
<your-env>\Scripts\pip.exe install {{ metadata['repo']['distribution_name'] }}
91+
py -m venv <your-env>
92+
.\<your-env>\Scripts\activate
93+
pip install {{ metadata['repo']['distribution_name'] }}
9594
9695
Next Steps
9796
~~~~~~~~~~

0 commit comments

Comments
 (0)