tanghaibao / jcvi

Python library to facilitate genome assembly, annotation, and comparative genomics
BSD 2-Clause "Simplified" License
712 stars 185 forks source link

AttributeError: module 'matplotlib' has no attribute 'colormaps' #620

Closed tclin422 closed 6 months ago

tclin422 commented 6 months ago

Any suggestions?

A total of 1335 (NR:476) anchors found in 84 clusters. Stats: Min=4 Max=163 N=84 Mean=15.89 SD=19.49 Median=10.0 Sum=1335 NR stats: Min=4 Max=15 N=84 Mean=5.67 SD=2.07 Median=5.0 Sum=476 Traceback (most recent call last): File "/home/linx/miniconda3/envs/jcvi/lib/python3.6/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/home/linx/miniconda3/envs/jcvi/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/linx/miniconda3/envs/jcvi/lib/python3.6/site-packages/jcvi/compara/catalog.py", line 978, in main() File "/home/linx/miniconda3/envs/jcvi/lib/python3.6/site-packages/jcvi/compara/catalog.py", line 78, in main p.dispatch(globals()) File "/home/linx/miniconda3/envs/jcvi/lib/python3.6/site-packages/jcvi/apps/base.py", line 140, in dispatch globalsaction File "/home/linx/miniconda3/envs/jcvi/lib/python3.6/site-packages/jcvi/compara/catalog.py", line 764, in ortholog dotplot_main(dargs) File "/home/linx/miniconda3/envs/jcvi/lib/python3.6/site-packages/jcvi/graphics/dotplot.py", line 457, in dotplot_main args, figsize="9x9", style="dark", dpi=90, cmap="copper" File "/home/linx/miniconda3/envs/jcvi/lib/python3.6/site-packages/jcvi/apps/base.py", line 607, in set_image_options iopts = ImageOptions(opts) File "/home/linx/miniconda3/envs/jcvi/lib/python3.6/site-packages/jcvi/graphics/base.py", line 76, in init self.cmap = mpl.colormaps[opts.cmap] AttributeError: module 'matplotlib' has no attribute 'colormaps'

tanghaibao commented 6 months ago

@tclin422

Would you please try upgrading matplotlib?

Also, please consider switching to python3.7 going forward. Officially we support py3.7+ at this point.

tclin422 commented 6 months ago

@tclin422

Would you please try upgrading matplotlib?

Also, please consider switching to python3.7 going forward. Officially we support py3.7+ at this point.

Thank you Prof Tang, it's solved.

The previous installation code:

mamba create -n jcvi -c conda-forge -c bioconda "biopython=1.70" numpy deap networkx matplotlib mamba activate jcvi python3 -m pip install jcvi

The one works: mamba create -n jcvi -c bioconda -c conda-forge jcvi last

The version of all the dependencies:

Name Version Build Channel

_libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 2_gnu conda-forge _r-mutex 1.0.1 anacondar_1 conda-forge argcomplete 3.2.1 pyhd8ed1ab_0 conda-forge argh 0.31.0 pyhd8ed1ab_0 conda-forge atk-1.0 2.38.0 hd4edc92_1 conda-forge binutils_impl_linux-64 2.36.1 h193b22a_2 conda-forge binutils_linux-64 2.36 hf3e587d_10 conda-forge biopython 1.82 py310h2372a71_0 conda-forge blas 1.1 openblas conda-forge boto3 1.34.14 pyhd8ed1ab_0 conda-forge botocore 1.34.14 pyhd8ed1ab_0 conda-forge brewer2mpl 1.4.1 py_3 conda-forge brotli 1.1.0 hd590300_1 conda-forge brotli-bin 1.1.0 hd590300_1 conda-forge brotli-python 1.1.0 py310hc6cd4ac_1 conda-forge bwidget 1.9.14 ha770c72_1 conda-forge bzip2 1.0.8 hd590300_5 conda-forge c-ares 1.24.0 hd590300_0 conda-forge ca-certificates 2023.11.17 hbcca054_0 conda-forge cairo 1.18.0 h3faef2a_0 conda-forge certifi 2023.11.17 pyhd8ed1ab_0 conda-forge charset-normalizer 3.3.2 pyhd8ed1ab_0 conda-forge contourpy 1.2.0 py310hd41b1e2_0 conda-forge coverage 6.5.0 py310h5764c6d_1 conda-forge coveralls 3.3.1 pyhd8ed1ab_0 conda-forge curl 7.26.0 1 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free cycler 0.12.1 pyhd8ed1ab_0 conda-forge dbus 1.13.18 hb2f20db_0 defaults deap 1.0.2 pyh864c0ab_2 bioconda docopt 0.6.2 py_1 conda-forge ete3 3.1.3 pyhd8ed1ab_0 conda-forge expat 2.5.0 hcb278e6_1 conda-forge font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge font-ttf-inconsolata 3.000 h77eed37_0 conda-forge font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge font-ttf-ubuntu 0.83 h77eed37_1 conda-forge fontconfig 2.14.2 h14ed4e7_0 conda-forge fonts-conda-ecosystem 1 0 conda-forge fonts-conda-forge 1 0 conda-forge fonttools 4.47.0 py310h2372a71_0 conda-forge freetype 2.12.1 h267a509_2 conda-forge fribidi 1.0.10 h36c2ea0_0 conda-forge gcc_impl_linux-64 11.2.0 h82a94d6_16 conda-forge gcc_linux-64 11.2.0 h39a9532_10 conda-forge gdk-pixbuf 2.42.10 h05c8ddd_0 conda-forge gettext 0.21.1 h27087fc_0 conda-forge gffutils 0.12 pyh7cba7a3_0 bioconda gfortran_impl_linux-64 11.2.0 h7a446d4_16 conda-forge gfortran_linux-64 11.2.0 h777b47f_10 conda-forge giflib 5.2.1 h0b41bf4_3 conda-forge glib 2.78.3 hfc55251_0 conda-forge glib-tools 2.78.3 hfc55251_0 conda-forge goatools 1.2.3 pyh7cba7a3_2 bioconda graphite2 1.3.13 h58526e2_1001 conda-forge graphviz 9.0.0 h78e8752_1 conda-forge greenlet 3.0.3 py310hc6cd4ac_0 conda-forge gst-plugins-base 1.14.1 h6a678d5_1 defaults gstreamer 1.14.1 h5eee18b_1 defaults gtk2 2.24.33 h7f000aa_3 conda-forge gts 0.7.6 h977cf35_4 conda-forge gxx_impl_linux-64 11.2.0 h82a94d6_16 conda-forge gxx_linux-64 11.2.0 hacbe6df_10 conda-forge harfbuzz 8.3.0 h3d44ed6_0 conda-forge icu 73.2 h59595ed_0 conda-forge idna 3.6 pyhd8ed1ab_0 conda-forge importlib-metadata 7.0.1 pyha770c72_0 conda-forge jcvi 1.3.9 py310hd6be1da_0 bioconda jinja2 3.1.2 pyhd8ed1ab_1 conda-forge jmespath 1.0.1 pyhd8ed1ab_0 conda-forge jpeg 9e h0b41bf4_3 conda-forge kernel-headers_linux-64 2.6.32 he073ed8_16 conda-forge keyutils 1.6.1 h166bdaf_0 conda-forge kiwisolver 1.4.5 py310hd41b1e2_1 conda-forge krb5 1.20.1 hf9c8cef_0 conda-forge last 1522 h43eeafb_0 bioconda lcms2 2.15 hfd0df8a_0 conda-forge ld_impl_linux-64 2.36.1 hea4e1c9_2 conda-forge lerc 3.0 h9c3ff4c_0 conda-forge libblas 3.9.0 20_linux64_openblas conda-forge libbrotlicommon 1.1.0 hd590300_1 conda-forge libbrotlidec 1.1.0 hd590300_1 conda-forge libbrotlienc 1.1.0 hd590300_1 conda-forge libcblas 3.9.0 20_linux64_openblas conda-forge libclang 14.0.6 default_h7634d5b_1 conda-forge libclang13 14.0.6 default_h9986a30_1 conda-forge libcups 2.3.3 h36d4200_3 conda-forge libcurl 8.2.1 h91b91d3_0 defaults libdeflate 1.17 h0b41bf4_0 conda-forge libedit 3.1.20191231 he28a2e2_2 conda-forge libev 4.33 hd590300_2 conda-forge libexpat 2.5.0 hcb278e6_1 conda-forge libffi 3.4.2 h7f98852_5 conda-forge libgcc-devel_linux-64 11.2.0 h0952999_16 conda-forge libgcc-ng 13.2.0 h807b86a_3 conda-forge libgd 2.3.3 h695aa2c_1 defaults libgfortran-ng 13.2.0 h69a702a_3 conda-forge libgfortran5 13.2.0 ha4646dd_3 conda-forge libglib 2.78.3 h783c2da_0 conda-forge libgomp 13.2.0 h807b86a_3 conda-forge libiconv 1.17 hd590300_2 conda-forge liblapack 3.9.0 20_linux64_openblas conda-forge libllvm14 14.0.6 hcd5def8_4 conda-forge libnghttp2 1.52.0 ha637b67_1 defaults libnsl 2.0.1 hd590300_0 conda-forge libopenblas 0.3.25 pthreads_h413a1c8_0 conda-forge libpng 1.6.39 h753d276_0 conda-forge libpq 12.15 h37d81fd_1 defaults librsvg 2.56.3 h98fae49_0 conda-forge libsanitizer 11.2.0 he4da1e4_16 conda-forge libsodium 1.0.18 h36c2ea0_1 conda-forge libsqlite 3.44.2 h2797004_0 conda-forge libssh2 1.10.0 haa6b8db_3 conda-forge libstdcxx-devel_linux-64 11.2.0 h0952999_16 conda-forge libstdcxx-ng 13.2.0 h7e041cc_3 conda-forge libtiff 4.5.1 h6a678d5_0 defaults libuuid 2.38.1 h0b41bf4_0 conda-forge libwebp 1.3.2 h11a3e52_0 defaults libwebp-base 1.3.2 hd590300_0 conda-forge libxcb 1.15 h0b41bf4_0 conda-forge libxkbcommon 1.6.0 h5d7e998_0 conda-forge libxml2 2.11.6 h232c23b_0 conda-forge libxslt 1.1.37 h0054252_1 conda-forge libzlib 1.2.13 hd590300_5 conda-forge lxml 4.9.3 py310h9b7343a_3 conda-forge make 4.3 hd18ef5c_1 conda-forge markdown-it-py 3.0.0 pyhd8ed1ab_0 conda-forge markupsafe 2.1.3 py310h2372a71_1 conda-forge matplotlib 3.8.2 py310hff52083_0 conda-forge matplotlib-base 3.8.2 py310h62c0568_0 conda-forge mdurl 0.1.2 pyhd8ed1ab_0 conda-forge more-itertools 10.1.0 pyhd8ed1ab_0 conda-forge munkres 1.0.7 py_1 bioconda mysql 5.7.20 hf484d3e_1001 conda-forge mysql-connector-c 6.1.11 h6eb9d5d_1007 conda-forge natsort 8.4.0 pyhd8ed1ab_0 conda-forge ncurses 6.4 h59595ed_2 conda-forge networkx 3.2.1 pyhd8ed1ab_0 conda-forge numpy 1.26.3 py310hb13e2d6_0 conda-forge openblas 0.3.25 pthreads_h7a3da1a_0 conda-forge openjpeg 2.5.0 hfec8fc6_2 conda-forge openssl 1.1.1w hd590300_0 conda-forge packaging 23.2 pyhd8ed1ab_0 conda-forge pandas 2.1.4 py310hcc13569_0 conda-forge pango 1.50.14 ha41ecd1_2 conda-forge parallel 20170422 pl5.22.0_0 bioconda patsy 0.5.6 pyhd8ed1ab_0 conda-forge pcre2 10.42 hcad00b1_0 conda-forge perl 5.22.0.1 0 conda-forge pillow 10.0.1 py310ha6cbd5a_0 defaults pip 23.3.2 pyhd8ed1ab_0 conda-forge pixman 0.42.2 h59595ed_0 conda-forge pthread-stubs 0.4 h36c2ea0_1001 conda-forge pydot 2.0.0 py310hff52083_0 conda-forge pyfaidx 0.7.2.2 pyhdfd78af_0 bioconda pygments 2.17.2 pyhd8ed1ab_0 conda-forge pygraphviz 1.11 py310h31db22a_2 conda-forge pyparsing 3.1.1 pyhd8ed1ab_0 conda-forge pypdf2 2.11.1 pyhd8ed1ab_0 conda-forge pyqt 5.15.4 py310hd8f1fbe_0 conda-forge pyqt5-sip 12.9.0 py310hd8f1fbe_0 conda-forge pysocks 1.7.1 pyha2e5f31_6 conda-forge python 3.10.8 h257c98d_0_cpython conda-forge python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge python-tzdata 2023.4 pyhd8ed1ab_0 conda-forge python-wget 3.2 py_0 conda-forge python_abi 3.10 4_cp310 conda-forge pytz 2023.3.post1 pyhd8ed1ab_0 conda-forge pyvcf3 1.0.3 pyhdfd78af_0 bioconda pyyaml 6.0.1 py310h2372a71_1 conda-forge pyzmq 25.1.2 py310h795f18f_0 conda-forge qt-main 5.15.2 h110a718_10 defaults r-base 4.3.1 h1ae530e_0 defaults r-cli 3.6.2 r43ha503ecb_0 conda-forge r-colorspace 2.1_0 r43h57805ef_1 conda-forge r-crayon 1.5.2 r43hc72bb7e_2 conda-forge r-ellipsis 0.3.2 r43h57805ef_2 conda-forge r-fansi 1.0.6 r43h57805ef_0 conda-forge r-farver 2.1.1 r43ha503ecb_2 conda-forge r-ggplot2 3.4.4 r43hc72bb7e_0 conda-forge r-glue 1.6.2 r43h57805ef_2 conda-forge r-gtable 0.3.4 r43hc72bb7e_0 conda-forge r-isoband 0.2.7 r43ha503ecb_2 conda-forge r-labeling 0.4.3 r43hc72bb7e_0 conda-forge r-lattice 0.22_5 r43h57805ef_0 conda-forge r-lifecycle 1.0.4 r43hc72bb7e_0 conda-forge r-magrittr 2.0.3 r43h57805ef_2 conda-forge r-mass 7.3_60 r43h57805ef_1 conda-forge r-matrix 1.6_4 r43h316c678_0 conda-forge r-mgcv 1.9_1 r43h316c678_0 conda-forge r-munsell 0.5.0 r43hc72bb7e_1006 conda-forge r-nlme 3.1_164 r43h61816a4_0 conda-forge r-pillar 1.9.0 r43hc72bb7e_1 conda-forge r-pkgconfig 2.0.3 r43hc72bb7e_3 conda-forge r-r6 2.5.1 r43hc72bb7e_2 conda-forge r-rcolorbrewer 1.1_3 r43h785f33e_2 conda-forge r-rlang 1.1.2 r43ha503ecb_0 conda-forge r-scales 1.3.0 r43hc72bb7e_0 conda-forge r-tibble 3.2.1 r43h57805ef_2 conda-forge r-tinytex 0.49 r43hc72bb7e_0 conda-forge r-utf8 1.2.4 r43h57805ef_0 conda-forge r-vctrs 0.6.5 r43ha503ecb_0 conda-forge r-viridislite 0.4.2 r43hc72bb7e_1 conda-forge r-withr 2.5.2 r43hc72bb7e_0 conda-forge r-xfun 0.41 r43ha503ecb_0 conda-forge readline 8.2 h8228510_1 conda-forge requests 2.31.0 pyhd8ed1ab_0 conda-forge rich 13.7.0 pyhd8ed1ab_0 conda-forge s3transfer 0.10.0 pyhd8ed1ab_0 conda-forge scipy 1.11.4 py310hb13e2d6_0 conda-forge scoop 0.7.1.1 pyh864c0ab_4 bioconda seaborn-base 0.13.1 pyhd8ed1ab_0 conda-forge setuptools 69.0.3 pyhd8ed1ab_0 conda-forge simplejson 3.19.2 py310h2372a71_0 conda-forge sip 6.5.1 py310h122e73d_2 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge sqlite 3.44.2 h2c6b66d_0 conda-forge statsmodels 0.14.1 py310h1f7b6fc_0 conda-forge sysroot_linux-64 2.12 he073ed8_16 conda-forge tk 8.6.13 noxft_h4845f30_101 conda-forge tktable 2.10 h0c5db8f_5 conda-forge toml 0.10.2 pyhd8ed1ab_0 conda-forge tomli 2.0.1 pyhd8ed1ab_0 conda-forge tornado 6.3.3 py310h2372a71_1 conda-forge typing_extensions 4.9.0 pyha770c72_0 conda-forge tzdata 2023d h0c530f3_0 conda-forge ucsc-liftover 447 h954228d_0 bioconda unicodedata2 15.1.0 py310h2372a71_0 conda-forge urllib3 1.26.18 pyhd8ed1ab_0 conda-forge wheel 0.42.0 pyhd8ed1ab_0 conda-forge xkeyboard-config 2.40 hd590300_0 conda-forge xlsxwriter 3.1.9 pyhd8ed1ab_0 conda-forge xorg-kbproto 1.0.7 h7f98852_1002 conda-forge xorg-libice 1.1.1 hd590300_0 conda-forge xorg-libsm 1.2.4 h7391055_0 conda-forge xorg-libx11 1.8.7 h8ee46fc_0 conda-forge xorg-libxau 1.0.11 hd590300_0 conda-forge xorg-libxdmcp 1.1.3 h7f98852_0 conda-forge xorg-libxext 1.3.4 h0b41bf4_2 conda-forge xorg-libxrender 0.9.11 hd590300_0 conda-forge xorg-renderproto 0.11.1 h7f98852_1002 conda-forge xorg-xextproto 7.3.0 h0b41bf4_1003 conda-forge xorg-xproto 7.0.31 h7f98852_1007 conda-forge xz 5.4.5 h5eee18b_0 defaults yaml 0.2.5 h7f98852_2 conda-forge zeromq 4.3.5 h59595ed_0 conda-forge zipp 3.17.0 pyhd8ed1ab_0 conda-forge zlib 1.2.13 hd590300_5 conda-forge zstd 1.5.5 hfc55251_0 conda-forge