enveda / mspaint

multi-engine painting of mass spec data
GNU General Public License v2.0
0 stars 0 forks source link

`ImportError` numpy #7

Open chanana opened 1 year ago

chanana commented 1 year ago

When i do:

from mspaint.plotter import Plotter
p = Plotter("plotly")

gives me:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
Cell In[46], line 1
----> 1 from mspaint.plotter import Plotter
      2 p = Plotter("plotly")

File [~/code/dx-metabolomics/.venv/lib/python3.9/site-packages/mspaint/plotter.py:5](https://file+.vscode-resource.vscode-cdn.net/Users/shaurya/code/dx-metabolomics/notebooks/~/code/dx-metabolomics/.venv/lib/python3.9/site-packages/mspaint/plotter.py:5)
      2 from textwrap import dedent
      3 from typing import Literal, Tuple
----> 5 import holoviews as hv
      6 import numpy as np
      7 import pandas as pd

File [~/code/dx-metabolomics/.venv/lib/python3.9/site-packages/holoviews/__init__.py:115](https://file+.vscode-resource.vscode-cdn.net/Users/shaurya/code/dx-metabolomics/notebooks/~/code/dx-metabolomics/.venv/lib/python3.9/site-packages/holoviews/__init__.py:115)
    111 warnings.filterwarnings("ignore",
    112                         message="elementwise comparison failed; returning scalar instead")
    114 if "IPython" in sys.modules:
--> 115     from .ipython import notebook_extension
    116     extension = notebook_extension # noqa (name remapping)
    117 else:

File [~/code/dx-metabolomics/.venv/lib/python3.9/site-packages/holoviews/ipython/__init__.py:14](https://file+.vscode-resource.vscode-cdn.net/Users/shaurya/code/dx-metabolomics/notebooks/~/code/dx-metabolomics/.venv/lib/python3.9/site-packages/holoviews/ipython/__init__.py:14)
     12 from ..core.tree import AttrTree
     13 from ..core.options import Store
---> 14 from ..element.comparison import ComparisonTestCase
     15 from ..util import extension
     16 from ..plotting.renderer import Renderer

File [~/code/dx-metabolomics/.venv/lib/python3.9/site-packages/holoviews/element/comparison.py:25](https://file+.vscode-resource.vscode-cdn.net/Users/shaurya/code/dx-metabolomics/notebooks/~/code/dx-metabolomics/.venv/lib/python3.9/site-packages/holoviews/element/comparison.py:25)
     23 from unittest.util import safe_repr
     24 from unittest import TestCase
---> 25 from numpy.testing import assert_array_equal, assert_array_almost_equal
     27 from . import *    # noqa (All Elements need to support comparison)
     28 from ..core import (Element, Empty, AdjointLayout, Overlay, Dimension,
     29                     HoloMap, Dimensioned, Layout, NdLayout, NdOverlay,
     30                     GridSpace, DynamicMap, GridMatrix, OrderedDict)

File [~/code/dx-metabolomics/.venv/lib/python3.9/site-packages/numpy/testing/__init__.py:14](https://file+.vscode-resource.vscode-cdn.net/Users/shaurya/code/dx-metabolomics/notebooks/~/code/dx-metabolomics/.venv/lib/python3.9/site-packages/numpy/testing/__init__.py:14)
     12 from ._private.utils import (_assert_valid_refcount, _gen_alignment_data)
     13 from ._private import extbuild
---> 14 from . import overrides
     16 __all__ = (
     17     _private.utils.__all__ + ['TestCase', 'overrides']
     18 )
     20 from numpy._pytesttester import PytestTester

File [~/code/dx-metabolomics/.venv/lib/python3.9/site-packages/numpy/testing/overrides.py:6](https://file+.vscode-resource.vscode-cdn.net/Users/shaurya/code/dx-metabolomics/notebooks/~/code/dx-metabolomics/.venv/lib/python3.9/site-packages/numpy/testing/overrides.py:6)
      1 """Tools for testing implementations of __array_function__ and ufunc overrides
      2 
      3 
      4 """
----> 6 from numpy.core.overrides import ARRAY_FUNCTIONS as _array_functions
      7 from numpy import ufunc as _ufunc
      8 import numpy.core.umath as _umath

ImportError: cannot import name 'ARRAY_FUNCTIONS' from 'numpy.core.overrides' (/Users/shaurya/code/dx-metabolomics/.venv/lib/python3.9/site-packages/numpy/core/overrides.py)
chanana commented 1 year ago

I was on 3.9.16 when this happened