@@ -20,9 +20,9 @@ figures have some issues with virtual environments. Everything below assumes
2020some familiarity with the Matplotlib backends as found in :ref: `What is a
2121backend? <what-is-a-backend>`.
2222
23- If you only use the ``IPython/Jupyter `` inline and ``notebook/nbagg `` backends
24- and non interactive backends you should not have any issues and can ignore
25- everything below.
23+ If you only use the ``IPython/Jupyter Notebook ``'s `` inline `` and ``notebook ``
24+ backends and non interactive backends you should not have any issues and can
25+ ignore everything below.
2626
2727GUI Frameworks
2828==============
@@ -44,12 +44,13 @@ and can be used directly within a virtual environment.
4444Other frameworks are harder to install into a virtual environment. There are at
4545least two possible ways to get access to these in a virtual environment.
4646
47- You can pass the ``--system-site-packages `` option to virtualenv when creating
48- an environment. This adds all system wide packages to the virtual environment.
49- However, this breaks the isolation between the virtual environment and the
50- system install. If you use `virtualenvwrapper
51- <https://virtualenvwrapper.readthedocs.org/> `_ this can be toggled with the
52- ``toggleglobalsitepackages `` command.
47+ One often suggested solution is to use the ``--system-site-packages `` option
48+ to virtualenv when creating an environment. This adds all system wide packages
49+ to the virtual environment. However, this breaks the isolation between the
50+ virtual environment and the system install. Among other issues it result in
51+ hard to debug problems with system packages shadowing the enviroment packages.
52+ If you use `virtualenvwrapper <https://virtualenvwrapper.readthedocs.org/ >`_
53+ this can be toggled with the ``toggleglobalsitepackages `` command.
5354
5455Alternatively you can manually symlink the GUI frameworks into the environment.
5556I.e. to use PyQt5 you should symlink ``PyQt5 `` and ``sip `` from your system
@@ -76,7 +77,7 @@ The issue has been reported on the virtualenv bug tracker `here
7677Until this is fixed a work around is needed. The best known work around,
7778borrowed from the `WX wiki
7879<http://wiki.wxpython.org/wxPythonVirtualenvOnMac> `_, is to use the non
79- virualenv python along with the PYTHONHOME environmental variable. This can be
80+ virtualenv python along with the PYTHONHOME environmental variable. This can be
8081implemented in a script as below. To use this modify ``PYVER `` and
8182``PATHTOPYTHON `` and put the script in the virtualenv bin directory i.e.
8283``PATHTOVENV/bin/frameworkpython ``
@@ -94,7 +95,7 @@ implemented in a script as below. To use this modify ``PYVER`` and
9495 ENV=` $PYTHON -c " import os; print os.path.abspath(os.path.join(os.path.dirname(\" $0 \" ), '..'))" `
9596
9697 # now run Python with the virtualenv set as Python's HOME
97- export PYTHONHOME=$ENV
98+ export PYTHONHOME=$ENV
9899 exec $PYTHON " $@ "
99100
100101
0 commit comments