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

Skip to content

Commit cca1a60

Browse files
committed
Merge remote-tracking branch 'upstream/v1.5.0-doc' into v1.5.x
2 parents 921a7ba + 6f0e6ad commit cca1a60

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

doc/_templates/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ <h1>Open source</h1>
184184
the <a href="http://numfocus.org/johnhunter/">John Hunter Memorial
185185
Fund</a>.
186186
</p>
187-
x
187+
188188
<p>
189189
The matplotlib <a href="{{ pathto('users/license') }}">license</a> is based on the Python Software Foundation
190190
<a href="http://www.python.org/psf/license">(PSF)</a> license.

doc/faq/virtualenv_faq.rst

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,12 @@ The issue has been reported on the virtualenv bug tracker `here
7777
<https://github.com/pypa/virtualenv/issues/54>`__ and `here
7878
<https://github.com/pypa/virtualenv/issues/609>`__
7979

80-
Until this is fixed, a workaround is needed. The best known workaround,
80+
Until this is fixed, one of the following workarounds must be used:
81+
82+
``PYTHONHOME`` Script
83+
---------------------
84+
85+
The best known workaround,
8186
borrowed from the `WX wiki
8287
<http://wiki.wxpython.org/wxPythonVirtualenvOnMac>`_, is to use the non
8388
virtualenv python along with the PYTHONHOME environment variable. This can be
@@ -108,6 +113,27 @@ framework build within the virtualenv. To run a script you can do
108113
framework build. To run an interactive ``IPython`` session with the framework
109114
build within the virtual environment you can do ``frameworkpython -m IPython``
110115

116+
``PYTHONHOME`` Function
117+
-----------------------
118+
119+
Alternatively you can define a function in your ``.bashrc`` using
120+
121+
.. code:: bash
122+
123+
function frameworkpython {
124+
if [[ ! -z "$VIRTUAL_ENV" ]]; then
125+
PYTHONHOME=$VIRTUAL_ENV /usr/local/bin/python "$@"
126+
else
127+
/usr/local/bin/python "$@"
128+
fi
129+
}
130+
131+
This function can then be used in all of your virtualenvs without having to
132+
fix every single one of them.
133+
134+
PythonW Compiler
135+
----------------
136+
111137
In addition
112138
`virtualenv-pythonw-osx <https://github.com/gldnspud/virtualenv-pythonw-osx>`_
113139
provides an alternative workaround which may be used to solve the issue.

0 commit comments

Comments
 (0)