@@ -20,9 +20,9 @@ figures have some issues with virtual environments. Everything below assumes
20
20
some familiarity with the Matplotlib backends as found in :ref: `What is a
21
21
backend? <what-is-a-backend>`.
22
22
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.
26
26
27
27
GUI Frameworks
28
28
==============
@@ -44,12 +44,13 @@ and can be used directly within a virtual environment.
44
44
Other frameworks are harder to install into a virtual environment. There are at
45
45
least two possible ways to get access to these in a virtual environment.
46
46
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.
53
54
54
55
Alternatively you can manually symlink the GUI frameworks into the environment.
55
56
I.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
76
77
Until this is fixed a work around is needed. The best known work around,
77
78
borrowed from the `WX wiki
78
79
<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
80
81
implemented in a script as below. To use this modify ``PYVER `` and
81
82
``PATHTOPYTHON `` and put the script in the virtualenv bin directory i.e.
82
83
``PATHTOVENV/bin/frameworkpython ``
@@ -94,7 +95,7 @@ implemented in a script as below. To use this modify ``PYVER`` and
94
95
ENV=` $PYTHON -c " import os; print os.path.abspath(os.path.join(os.path.dirname(\" $0 \" ), '..'))" `
95
96
96
97
# now run Python with the virtualenv set as Python's HOME
97
- export PYTHONHOME=$ENV
98
+ export PYTHONHOME=$ENV
98
99
exec $PYTHON " $@ "
99
100
100
101
0 commit comments