bootphon / pygamma-agreement

Gamma Agreement in Python
MIT License
40 stars 8 forks source link

ModuleNotFoundError: No module named 'matplotlib' #31

Closed lucasgautheron closed 2 years ago

lucasgautheron commented 2 years ago

The continuum module tries to import matplotlib regardless of whether it is installed/needed

./../../virtualenv/python3.6.7/lib/python3.6/site-packages/ChildProject-0.0.2.dev1-py3.6.egg/ChildProject/metrics.py:234: in gamma
    from pygamma_agreement.continuum import Continuum
../../../virtualenv/python3.6.7/lib/python3.6/site-packages/pygamma_agreement/__init__.py:29: in <module>
    from .continuum import Continuum, GammaResults, Unit
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    """
    import csv
    import logging
    import os
    from copy import deepcopy
    from dataclasses import dataclass
    from functools import total_ordering
    from concurrent.futures import ThreadPoolExecutor
    from pathlib import Path
    from typing import Optional, Tuple, List, Union, TYPE_CHECKING, Generator, Iterable

    import cvxpy as cp
>   import matplotlib.pyplot as plt
E   ModuleNotFoundError: No module named 'matplotlib'

Apparently, this issue occurs only in python 3.6 (see https://app.travis-ci.com/github/LAAC-LSCP/ChildProject/builds/238617379)

hadware commented 2 years ago

Good call! I've submitted a fix, i'm waiting for the tests to run and if they're ok, i'll be submitting version 0.5.1 to pipy.

hadware commented 2 years ago

Also, python 3.6 isn't officially supported

hadware commented 2 years ago

Alright, I uploaded a new version, tell me if this fixes things, and if so, you can close the issue.