Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 37c4874

Browse files
authored
Merge pull request matplotlib#6878 from matthew-brett/use-venv-for-py3
DOC: use venv instead of virtualenv on python 3
2 parents 84d979b + f3bf089 commit 37c4874

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

doc/faq/virtualenv_faq.rst

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,19 @@ and the systemwide install use the same python version.
6262
OSX
6363
===
6464

65+
Short version
66+
-------------
67+
68+
If you are on Python 3, use ``venv`` instead of ``virtualenv``::
69+
70+
python -m venv my-virtualenv
71+
source my-virtualenv/bin/activate
72+
73+
Otherwise you will need one of the workarounds below.
74+
75+
Long version
76+
------------
77+
6578
On OSX, two different types of Python Builds exist: a regular build and a
6679
framework build. In order to interact correctly with OSX through some
6780
GUI frameworks you need a framework build of Python.
@@ -80,7 +93,7 @@ The issue has been reported on the virtualenv bug tracker `here
8093
Until this is fixed, one of the following workarounds must be used:
8194

8295
``PYTHONHOME`` Script
83-
---------------------
96+
^^^^^^^^^^^^^^^^^^^^^
8497

8598
The best known workaround,
8699
borrowed from the `WX wiki
@@ -114,7 +127,7 @@ framework build. To run an interactive ``IPython`` session with the framework
114127
build within the virtual environment you can do ``frameworkpython -m IPython``
115128

116129
``PYTHONHOME`` Function
117-
-----------------------
130+
^^^^^^^^^^^^^^^^^^^^^^^
118131

119132
Alternatively you can define a function in your ``.bashrc`` using
120133

@@ -132,7 +145,7 @@ This function can then be used in all of your virtualenvs without having to
132145
fix every single one of them.
133146

134147
PythonW Compiler
135-
----------------
148+
^^^^^^^^^^^^^^^^
136149

137150
In addition
138151
`virtualenv-pythonw-osx <https://github.com/gldnspud/virtualenv-pythonw-osx>`_

0 commit comments

Comments
 (0)