Skip to content

Commit 81c68ef

Browse files
committed
Added more info in virtualenvs.rst.
Added commands to specify python interpreter version.
1 parent 73a961a commit 81c68ef

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

docs/dev/virtualenvs.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ Basic Usage
3232
This creates a copy of Python in whichever directory you ran the command in,
3333
placing it in a folder named :file:`venv`.
3434

35+
You can also use a Python interpreter of your choice.
36+
37+
.. code-block:: console
38+
39+
$ virtualenv -p /usr/bin/python2.7 venv
40+
41+
This will use the Python interpreter in :file:`/usr/bin/python2.7`
42+
3543
2. To begin using the virtual environment, it needs to be activated:
3644

3745
.. code-block:: console
@@ -96,6 +104,15 @@ Basic Usage
96104
97105
This creates the :file:`venv` folder inside :file:`~/Envs`.
98106

107+
You can also specifiy the Python interpreter to use and requirements file to install from.
108+
109+
.. code-block:: console
110+
111+
$ mkvirtualenv -p /usr/bin/python3.4 -r requirements.txt venv
112+
113+
This will create a virtual environment using the python interpreter in :file:`/usr/bin/python3.4` and
114+
install the packages from :file:`requirements.txt`
115+
99116
2. Work on a virtual environment:
100117

101118
.. code-block:: console

0 commit comments

Comments
 (0)