<div dir="ltr"><div><div>Yup, I think that is your problem. You will want to do a "sudo pip uninstall pylab". By the way, it is really a bad idea to do any pip installs with sudo. Pip installs execute arbitrary code, and you don't want to give arbitrary code sudo access. Furthermore, it is probably best to maintain a distinction between the "user's python" and the "system's python". This is why virtual environments or anaconda has been so valuable because it helps with maintaining that distinction.<br><br></div>I hope that helps!<br></div>Ben Root<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 25, 2016 at 5:28 PM, blavergar <span dir="ltr"><<a href="mailto:blancaverag@gmail.com" target="_blank">blancaverag@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default"><font face="tahoma, sans-serif">Thank you for the answer!</font></div><div class="gmail_default"><font face="tahoma, sans-serif"><br></font></div><div class="gmail_default"><font face="tahoma, sans-serif">This is the output:</font></div><div class="gmail_default"><font face="tahoma, sans-serif"><br></font></div><div class="gmail_default"><font face="tahoma, sans-serif">/usr/local/lib/python2.7/site-packages/pylab/__init__.pyc</font><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><span class="">2016-04-25 21:31 GMT+02:00 Benjamin Root [via matplotlib] <span dir="ltr"><<a href="http:///user/SendEmail.jtp?type=node&node=47021&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>></span>:<br></span><blockquote style="border-left:2px solid #cccccc;padding:0 1em" class="gmail_quote"><span class="">

        <div dir="ltr"><div><div><div><div>Can you do the following (from the python interpreter)<br><br></div>import pylab<br></div>print pylab.__file__<br><br></div>There has been a rogue package on pypi called "pylab" that we have been trying to get taken off of the listing, since it conflicts with our long-standing package and trademark. Nothing nefarious, just some person's collection of dependencies that he decided to call pylab and uploaded to pypi for his personal use.<br><br></div>Ben Root<br><br></div></span><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Mon, Apr 25, 2016 at 5:00 AM, blavergar <span dir="ltr"><<a href="http:///user/SendEmail.jtp?type=node&node=47019&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>></span> wrote:<br></div></div><blockquote style="border-left:2px solid #cccccc;padding:0 1em" class="gmail_quote"><div><div class="h5">Dear all,<br>
<br>
I want to use two programs (GroopM and QIIME) requiring matplotlib >=1.1.0<br>
and python 2.7, which I have installed. My OS is Centos 6.<br>
<br>
They both give similar errors:<br>
<br>
1.<br>
(...)<br>
*** ERROR RAISED DURING STEP: Plot Taxonomy Summary<br>
Command run was:<br>
 plot_taxa_summary.py -i<br>
taxa_summary2/OTU_L2.txt,taxa_summary2/OTU_L3.txt,taxa_summary2/OTU_L4.txt,taxa_summary2/OTU_L5.txt,taxa_summary2/OTU_L6.txt<br>
-o taxa_summary2/taxa_summary_plots/<br>
Command returned exit status: 1<br>
Stdout:<br>
<br>
Stderr<br>
Traceback (most recent call last):<br>
  File "/usr/local/bin/plot_taxa_summary.py", line 20, in <module><br>
    from qiime.plot_taxa_summary import make_all_charts<br>
  File "/usr/local/lib/python2.7/site-packages/qiime/plot_taxa_summary.py",<br>
line 24, in <module><br>
    from pylab import rc, axis, title, axes, pie, figlegend, clf, savefig,<br>
figure\<br>
*ImportError: cannot import name rc*<br>
<br>
<br>
<br>
Pylab is imported in plot_taxa_summary.py as follows:<br>
<br>
(...)<br>
<br>
import matplotlib<br>
import re<br>
matplotlib.use('Agg', warn=False)<br>
from matplotlib.font_manager import FontProperties<br>
from pylab import rc, axis, title, axes, pie, figlegend, clf, savefig,<br>
figure\<br>
    , close<br>
<br>
(...)<br>
<br>
<br>
2.<br>
(...)<br>
File "/usr/local/lib/python2.7/site-packages/groopm/cluster.py", line 54, in<br>
<module><br>
from pylab import show<br>
<br>
*ImportError: cannot import name show*<br>
<br>
<br>
<br>
And the content of cluster.py involving the importing of pylab is:<br>
(...)<br>
from sys import stdout, exit<br>
<br>
from colorsys import hsv_to_rgb as htr<br>
import matplotlib.pyplot as plt<br>
from pylab import show<br>
from numpy import (abs as np_abs,<br>
 (...)<br>
<br>
<br>
<br>
As I read that pylab is installed directly with matplotlib I have already<br>
tried different versions and installations (conda, pip, yum...) but none of<br>
them got those programs working.<br>
<br>
<br>
Could someone help with this, please?<br>
<br>
Thank you!<br>
<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://matplotlib.1069221.n5.nabble.com/Import-error-Cannot-import-pylab-modules-tp47010.html" rel="nofollow" link="external" target="_blank">http://matplotlib.1069221.n5.nabble.com/Import-error-Cannot-import-pylab-modules-tp47010.html</a><br>
Sent from the matplotlib - users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Matplotlib-users mailing list<br>
</div></div><a href="http:///user/SendEmail.jtp?type=node&node=47019&i=1" rel="nofollow" link="external" target="_blank">[hidden email]</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-users" rel="nofollow" link="external" target="_blank">https://mail.python.org/mailman/listinfo/matplotlib-users</a><br>
</blockquote></div><br></div>
<br>_______________________________________________
<br>Matplotlib-users mailing list
<br><a href="http:///user/SendEmail.jtp?type=node&node=47019&i=2" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><a href="https://mail.python.org/mailman/listinfo/matplotlib-users" rel="nofollow" link="external" target="_blank">https://mail.python.org/mailman/listinfo/matplotlib-users</a><br>

        
        
        
        <br>
        <br>
        <hr color="#cccccc" size="1" noshade>
        <div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif">
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                <a href="http://matplotlib.1069221.n5.nabble.com/Import-error-Cannot-import-pylab-modules-tp47010p47019.html" rel="nofollow" link="external" target="_blank">http://matplotlib.1069221.n5.nabble.com/Import-error-Cannot-import-pylab-modules-tp47010p47019.html</a>
        </div>
        <div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
                
                To unsubscribe from Import error: Cannot import pylab modules, <a rel="nofollow" link="external">click here</a>.<br>
                <a href="http://matplotlib.1069221.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" link="external" target="_blank">NAML</a>
        </div></blockquote></div><br></div>


        
        
        
<br><hr width="300" align="left">
View this message in context: <a href="http://matplotlib.1069221.n5.nabble.com/Import-error-Cannot-import-pylab-modules-tp47010p47021.html" target="_blank">Re: Import error: Cannot import pylab modules</a><div class="HOEnZb"><div class="h5"><br>
Sent from the <a href="http://matplotlib.1069221.n5.nabble.com/matplotlib-users-f3.html" target="_blank">matplotlib - users mailing list archive</a> at Nabble.com.<br></div></div><br>_______________________________________________<br>
Matplotlib-users mailing list<br>
<a href="mailto:Matplotlib-users@python.org">Matplotlib-users@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-users" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/matplotlib-users</a><br>
<br></blockquote></div><br></div>