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

Benjamin Root ben.v.root at gmail.com
Mon Apr 25 15:30:26 EDT 2016


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 <blancaverag at gmail.com> 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
> Matplotlib-users at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20160425/af7669d2/attachment.html>


More information about the Matplotlib-users mailing list