merenlab / anvio

An analysis and visualization platform for 'omics data
http://merenlab.org/software/anvio
GNU General Public License v3.0
423 stars 144 forks source link

matplotlib not found when running self-test with suite "full" #764

Closed dcourtine closed 6 years ago

dcourtine commented 6 years ago

Hi all :) !

This morning I installed the V4 from scratch and I have had some errors. I work with: MacOSX 10.10.5 / Python 3.6.3 :: Anaconda custom (64-bit)

First, I had the same problem with Pysam as in the issue #659. I used the version 0.12 and now the anvi-self-test --suite mini completes successfully.

Then, while running anvi-self-test --suite full, I got this message:

:: Running anvi-mcg-classifier on a single bin in a collection ...

Traceback (most recent call last):
  File "/Users/courtine/GitHub/anvio/bin/anvi-mcg-classifier", line 9, in <module>
    from anvio.mcgclassifier import MetagenomeCentricGeneClassifier
  File "/Users/courtine/GitHub/anvio/anvio/mcgclassifier.py", line 14, in <module>
    import matplotlib
ModuleNotFoundError: No module named 'matplotlib'

Config Error: It seems something went wrong while running your tests :/ Anvi'o hopes that the
              reason is clear from the lines above.

I tried pip install matplotlib==2.1.2 and this step was successfully completed.

The last error occurs at the step

:: Firing up the interactive interface to display the contigs db stats …

The window is open without problem in Firefox (default browser), but when I load http://0.0.0.0:8080/app/index.html on Chrome, the is a pop-up « One or more ajax request has failed, See console log…. », with the following message:

Traceback (most recent call last):
  File "/Users/courtine/virtual-envs/anvi-master/lib/python3.6/site-packages/bottle.py", line 862, in _handle
    return route.call(**args)
  File "/Users/courtine/virtual-envs/anvi-master/lib/python3.6/site-packages/bottle.py", line 1740, in wrapper
    rv = callback(*a, **ka)
  File "/Users/courtine/GitHub/anvio/anvio/bottleroutes.py", line 257, in send_data
    return json.dumps( { "title":                              self.interactive.title,
AttributeError: 'ContigsInteractive' object has no attribute ‘title'

All other steps were successfully completed.

This was to let you know about these bugs, I only use the tools concerning pangenomics ;)

All the best, Damien

ShaiberAlon commented 6 years ago

Hi Damien,

I'm a little confused. Did the matplotlib error persist even after you installed matplotlib with pop?

ShaiberAlon commented 6 years ago

Of course I mean pip and not pop...

meren commented 6 years ago

It will probably be resolved after installing matlotlib, but regardless of that, there shouldn't be a matplotlib import error after a successful installation.

We needed to have it in our requirements.txt as a dependency so matplotlib is installed, or we shouldn't have run the part of the test that requires it. So this is still a bug on our part even if the error goes away after installing matplotlib via pip :)

ShaiberAlon commented 6 years ago

Agreed! But, does this mean I'm fired?

meren commented 6 years ago

no, it is me who is fired for not realizing this :)

I was supposed to test everything (and I thought I did).

ShaiberAlon commented 6 years ago

@meren, @ozcan, I want to add matplotlib to requirements.txt, but I'm not sure what minimal version to put. How do I figure that out? The version I'm using is 2.1.0, should I put that as the minimal version?

ozcan commented 6 years ago

@ShaiberAlon, I think it is better if we test with latest version 2.2.0 and put that one, which will get support for longer time and will require us to change it much later comparing to 2.1.0. But in the end, either one works, it is up to you.

meren commented 6 years ago

@ShaiberAlon, can we close this issue?