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

blavergar blancaverag at gmail.com
Mon Apr 25 05:00:53 EDT 2016


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.


More information about the Matplotlib-users mailing list