[Matplotlib-users] Import error: Cannot import pylab modules

blavergar blancaverag at gmail.com
Mon Apr 25 17:28:42 EDT 2016


Thank you for the answer!

This is the output:

/usr/local/lib/python2.7/site-packages/pylab/__init__.pyc

2016-04-25 21:31 GMT+02:00 Benjamin Root [via matplotlib] <
ml-node+s1069221n47019h33 at n5.nabble.com>:

> Can you do the following (from the python interpreter)
>
> import pylab
> print pylab.__file__
>
> 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.
>
> Ben Root
>
>
> On Mon, Apr 25, 2016 at 5:00 AM, blavergar <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=47019&i=0>> wrote:
>
>> Dear all,
>>
>> I want to use two programs (GroopM and QIIME) requiring matplotlib >=1.1.0
>> and python 2.7, which I have installed. My OS is Centos 6.
>>
>> They both give similar errors:
>>
>> 1.
>> (...)
>> *** ERROR RAISED DURING STEP: Plot Taxonomy Summary
>> Command run was:
>>  plot_taxa_summary.py -i
>>
>> 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
>> -o taxa_summary2/taxa_summary_plots/
>> Command returned exit status: 1
>> Stdout:
>>
>> Stderr
>> Traceback (most recent call last):
>>   File "/usr/local/bin/plot_taxa_summary.py", line 20, in <module>
>>     from qiime.plot_taxa_summary import make_all_charts
>>   File
>> "/usr/local/lib/python2.7/site-packages/qiime/plot_taxa_summary.py",
>> line 24, in <module>
>>     from pylab import rc, axis, title, axes, pie, figlegend, clf, savefig,
>> figure\
>> *ImportError: cannot import name rc*
>>
>>
>>
>> Pylab is imported in plot_taxa_summary.py as follows:
>>
>> (...)
>>
>> import matplotlib
>> import re
>> matplotlib.use('Agg', warn=False)
>> from matplotlib.font_manager import FontProperties
>> from pylab import rc, axis, title, axes, pie, figlegend, clf, savefig,
>> figure\
>>     , close
>>
>> (...)
>>
>>
>> 2.
>> (...)
>> File "/usr/local/lib/python2.7/site-packages/groopm/cluster.py", line 54,
>> in
>> <module>
>> from pylab import show
>>
>> *ImportError: cannot import name show*
>>
>>
>>
>> And the content of cluster.py involving the importing of pylab is:
>> (...)
>> from sys import stdout, exit
>>
>> from colorsys import hsv_to_rgb as htr
>> import matplotlib.pyplot as plt
>> from pylab import show
>> from numpy import (abs as np_abs,
>>  (...)
>>
>>
>>
>> As I read that pylab is installed directly with matplotlib I have already
>> tried different versions and installations (conda, pip, yum...) but none
>> of
>> them got those programs working.
>>
>>
>> Could someone help with this, please?
>>
>> Thank you!
>>
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://matplotlib.1069221.n5.nabble.com/Import-error-Cannot-import-pylab-modules-tp47010.html
>> Sent from the matplotlib - users mailing list archive at Nabble.com.
>> _______________________________________________
>> Matplotlib-users mailing list
>> [hidden email] <http:///user/SendEmail.jtp?type=node&node=47019&i=1>
>> https://mail.python.org/mailman/listinfo/matplotlib-users
>>
>
>
> _______________________________________________
> Matplotlib-users mailing list
> [hidden email] <http:///user/SendEmail.jtp?type=node&node=47019&i=2>
> https://mail.python.org/mailman/listinfo/matplotlib-users
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://matplotlib.1069221.n5.nabble.com/Import-error-Cannot-import-pylab-modules-tp47010p47019.html
> To unsubscribe from Import error: Cannot import pylab modules, click here
> <http://matplotlib.1069221.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=47010&code=YmxhbmNhdmVyYWdAZ21haWwuY29tfDQ3MDEwfC02NzEwOTE0OTc=>
> .
> NAML
> <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>
>




--
View this message in context: http://matplotlib.1069221.n5.nabble.com/Import-error-Cannot-import-pylab-modules-tp47010p47021.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20160425/e4cb0aab/attachment.html>


More information about the Matplotlib-users mailing list