<div dir="ltr">I can't tell from the trace back if you have activated or not.  I also would not clone the repo into the venv.<div><br></div><div>If the source for mpl is in `~/source/matplotlib` :</div><div><br></div><div>



<div>
<span style="font-family:monospace"><span style="color:rgb(0,0,0)">pyvenv --system-site-packages /tmp/test</span><br></span></div></div><div>



<div>
<span style="font-family:monospace"><span style="color:rgb(0,0,0)">source /tmp/test/bin/activate </span><br></span></div></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0)">cd ~/source/matplotlib</span></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0)">python setup.py develop</span></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0)"><br></span></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0)">Should install matplotlib into the 'test' venv (which lives in RAM on most modern linux machines).</span></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0)"><br></span></span></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0)">Tom</span></span></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 4, 2015 at 10:45 AM Jorge Scandaliaris <<a href="mailto:jscandaliaris@gmail.com">jscandaliaris@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
I am trying to followup on an issue I saw a couple of days ago with trendvis<br>
(I have opened an issue for it:<br>
<a href="https://github.com/matplotlib/matplotlib/issues/4812" rel="noreferrer" target="_blank">https://github.com/matplotlib/matplotlib/issues/4812</a> ). It was suggested to<br>
me that instead of installing using `python setup.py develop --user`, I<br>
should instead use virtualenv, venv or conda to manage different mpl<br>
versions. As I am not familiar with either, I started with venv, as I use<br>
python3.4 nowadays and it's included there.<br>
I created a virtual environment, following the guide suggested in python<br>
docs [1]. I created the virtual environment with --system-site-packages to<br>
avoid manually installing all the dependencies, making sure that no system<br>
nor user version of matplotlib were installed (import matplotlib now fails<br>
as expected). It is suggested there that one should use pip for installing<br>
packages. As I want to install the development version of mpl, I cloned the<br>
mpl sources in the virtual environment and then tried to install them with<br>
`pip install -e local/path/to/cloned/mpl/repo`, but I get an error. What am<br>
I doing wrong? I tried searching the web for installation procedures of mpl<br>
under virtual environments, but all I found was related to stable versions.<br>
Can anyone point me to a working procedure?<br>
<br>
The error I get is reproduced below:<br>
<br>
$ pip install -e matplotlib<br>
Obtaining file:///home/jscandal/sw/python/virtualenvs/mpl/matplotlib<br>
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.6 in<br>
/usr/lib/python3.4/site-packages (from matplotlib==1.5.dev1)<br>
Requirement already satisfied (use --upgrade to upgrade): python-dateutil in<br>
/usr/lib/python3.4/site-packages (from matplotlib==1.5.dev1)<br>
Requirement already satisfied (use --upgrade to upgrade): pytz in<br>
/usr/lib/python3.4/site-packages (from matplotlib==1.5.dev1)<br>
Requirement already satisfied (use --upgrade to upgrade): pyparsing>=1.5.6<br>
in /usr/lib/python3.4/site-packages (from matplotlib==1.5.dev1)<br>
Requirement already satisfied (use --upgrade to upgrade): six>=1.5 in<br>
/usr/lib/python3.4/site-packages (from python-dateutil->matplotlib==1.5.dev1)<br>
Installing collected packages: matplotlib<br>
  Running setup.py develop for matplotlib<br>
    Complete output from command /usr/bin/python -c "import setuptools,<br>
tokenize;<br>
__file__='/home/jscandal/sw/python/virtualenvs/mpl/matplotlib/setup.py';<br>
exec(compile(getattr(tokenize, 'open',<br>
open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" develop<br>
--no-deps:<br>
    ============================================================================<br>
    Edit setup.cfg to change the build options<br>
<br>
    BUILDING MATPLOTLIB<br>
                matplotlib: yes [1.5.dev1]<br>
                    python: yes [3.4.3 (default, Mar 25 2015, 17:13:50)  [GCC<br>
                            4.9.2 20150304 (prerelease)]]<br>
                  platform: yes [linux]<br>
<br>
    REQUIRED DEPENDENCIES AND EXTENSIONS<br>
                     numpy: yes [version 1.9.2]<br>
                  dateutil: yes [using dateutil version 2.4.2]<br>
                      pytz: yes [using pytz version 2015.4]<br>
                   tornado: yes [using tornado version 4.2.1]<br>
                 pyparsing: yes [using pyparsing version 2.0.3]<br>
                    libagg: yes [pkg-config information for 'libagg' could not<br>
                            be found. Using local copy.]<br>
                  freetype: yes [version 2.6.0]<br>
                       png: yes [version 1.6.18]<br>
                     qhull: yes [pkg-config information for 'qhull' could not be<br>
                            found. Using local copy.]<br>
<br>
    OPTIONAL SUBPACKAGES<br>
               sample_data: yes [installing]<br>
                  toolkits: yes [installing]<br>
                     tests: yes [using nose version 1.3.7 / using unittest.mock]<br>
            toolkits_tests: yes [using nose version 1.3.7 / using unittest.mock]<br>
<br>
    OPTIONAL BACKEND EXTENSIONS<br>
                    macosx: no  [Mac OS-X only]<br>
                    qt5agg: yes [installing, Qt: 5.5.0, PyQt: 5.5.0]<br>
                    qt4agg: yes [installing, Qt: 4.8.7, PySide: 1.2.2; Qt:<br>
                            4.8.7, PyQt: 4.8.7]<br>
<br>
    ** (-c:13703): WARNING **: Couldn't register with accessibility bus: Did<br>
not receive a reply. Possible causes include: the remote application did not<br>
send a reply, the message bus security policy blocked the reply, the reply<br>
timeout expired, or the network connection was broken.<br>
                   gtk3agg: yes [installing, version 3.6.16]<br>
<br>
    ** (-c:13711): WARNING **: Couldn't register with accessibility bus: Did<br>
not receive a reply. Possible causes include: the remote application did not<br>
send a reply, the message bus security policy blocked the reply, the reply<br>
timeout expired, or the network connection was broken.<br>
                 gtk3cairo: yes [installing, version 3.6.16]<br>
                    gtkagg: no  [Requires pygtk]<br>
                     tkagg: yes [installing, version not identified]<br>
                     wxagg: no  [requires wxPython]<br>
                       gtk: no  [Requires pygtk]<br>
                       agg: yes [installing]<br>
                     cairo: yes [installing, cairocffi version 1.10.0]<br>
                 windowing: no  [Microsoft Windows only]<br>
<br>
    OPTIONAL LATEX DEPENDENCIES<br>
                    dvipng: yes [version 1.14]<br>
               ghostscript: yes [version 9.16]<br>
                     latex: yes [version 3.14159265]<br>
                   pdftops: yes [version 0.33.0]<br>
<br>
    running develop<br>
    error: can't create or remove files in install directory<br>
<br>
    The following error occurred while trying to add or remove files in the<br>
    installation directory:<br>
<br>
        [Errno 13] Permission denied:<br>
'/usr/lib/python3.4/site-packages/test-easy-install-13667.write-test'<br>
<br>
    The installation directory you specified (via --install-dir, --prefix, or<br>
    the distutils default setting) was:<br>
<br>
        /usr/lib/python3.4/site-packages/<br>
<br>
    Perhaps your account does not have write access to this directory?  If the<br>
    installation directory is a system-owned directory, you may need to sign in<br>
    as the administrator or "root" account.  If you do not have administrative<br>
    access to this machine, you may wish to choose a different installation<br>
    directory, preferably one that is listed in your PYTHONPATH environment<br>
    variable.<br>
<br>
    For information on other options, you may wish to consult the<br>
    documentation at:<br>
<br>
      <a href="https://pythonhosted.org/setuptools/easy_install.html" rel="noreferrer" target="_blank">https://pythonhosted.org/setuptools/easy_install.html</a><br>
<br>
    Please make the appropriate changes for your system and try again.<br>
<br>
<br>
    ----------------------------------------<br>
Command "/usr/bin/python -c "import setuptools, tokenize;<br>
__file__='/home/jscandal/sw/python/virtualenvs/mpl/matplotlib/setup.py';<br>
exec(compile(getattr(tokenize, 'open',<br>
open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" develop<br>
--no-deps" failed with error code 1 in<br>
/home/jscandal/sw/python/virtualenvs/mpl/matplotlib<br>
<br>
<br>
[1]. <a href="https://packaging.python.org/en/latest/installing.html#virtual-environments" rel="noreferrer" target="_blank">https://packaging.python.org/en/latest/installing.html#virtual-environments</a><br>
<br>
_______________________________________________<br>
Matplotlib-devel mailing list<br>
<a href="mailto:Matplotlib-devel@python.org" target="_blank">Matplotlib-devel@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-devel" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/matplotlib-devel</a><br>
</blockquote></div>