ContextLab / supereeg

Infer activity throughout the brain from a small(ish) number of electrodes using Gaussian process regression
Other
34 stars 14 forks source link

Error on import #169

Closed mivade closed 6 years ago

mivade commented 6 years ago

I get the following error after installing supereeg with pip:

import supereeg
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
__init__.pxd in numpy.import_array()

RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb

During handling of the above exception, another exception occurred:

ImportError                               Traceback (most recent call last)
<ipython-input-2-e0be8a509604> in <module>()
----> 1 import supereeg

~/miniconda3/envs/cmlreaders/lib/python3.6/site-packages/supereeg/__init__.py in <module>()
----> 1 from .brain import Brain
      2 from .model import Model
      3 from .nifti import Nifti
      4 from .load import load
      5 from .simulate import *

~/miniconda3/envs/cmlreaders/lib/python3.6/site-packages/supereeg/brain.py in <module>()
     12 import matplotlib.pyplot as plt
     13 from scipy.stats import zscore
---> 14 from .helpers import _kurt_vals, _normalize_Y, _vox_size, _resample, _plot_locs_connectome, \
     15     _plot_locs_hyp, _std, _gray, _nifti_to_brain, _brain_to_nifti
     16 

~/miniconda3/envs/cmlreaders/lib/python3.6/site-packages/supereeg/helpers.py in <module>()
     12 import imageio
     13 import nibabel as nib
---> 14 import hypertools as hyp
     15 import shutil
     16 

~/miniconda3/envs/cmlreaders/lib/python3.6/site-packages/hypertools/__init__.py in <module>()
      1 #!/usr/bin/env python
      2 from .config import __version__
----> 3 from .plot.plot import plot
      4 from .tools.load import load
      5 from .tools.analyze import analyze

~/miniconda3/envs/cmlreaders/lib/python3.6/site-packages/hypertools/plot/plot.py in <module>()
     14 from .._shared.helpers import *
     15 from .._shared.params import default_params
---> 16 from ..tools.analyze import analyze
     17 from ..tools.cluster import cluster as clusterer
     18 from ..tools.df2mat import df2mat

~/miniconda3/envs/cmlreaders/lib/python3.6/site-packages/hypertools/tools/__init__.py in <module>()
      3 from .reduce import reduce
      4 from .missing_inds import missing_inds
----> 5 from .cluster import cluster
      6 from .df2mat import df2mat
      7 from .normalize import normalize

~/miniconda3/envs/cmlreaders/lib/python3.6/site-packages/hypertools/tools/cluster.py in <module>()
      4 import numpy as np
      5 import six
----> 6 from hdbscan import HDBSCAN
      7 from .._shared.helpers import *
      8 from .format_data import format_data as formatter

~/miniconda3/envs/cmlreaders/lib/python3.6/site-packages/hdbscan/__init__.py in <module>()
----> 1 from .hdbscan_ import HDBSCAN, hdbscan
      2 from .robust_single_linkage_ import RobustSingleLinkage, robust_single_linkage
      3 from .validity import validity_index
      4 from .prediction import approximate_predict, membership_vector, all_points_membership_vectors
      5 

~/miniconda3/envs/cmlreaders/lib/python3.6/site-packages/hdbscan/hdbscan_.py in <module>()
     19 from scipy.sparse import csgraph
     20 
---> 21 from ._hdbscan_linkage import (single_linkage,
     22                                mst_linkage_core,
     23                                mst_linkage_core_vector,

hdbscan/dist_metrics.pxd in init hdbscan._hdbscan_linkage()

hdbscan/dist_metrics.pyx in init hdbscan.dist_metrics()

__init__.pxd in numpy.import_array()

ImportError: numpy.core.multiarray failed to import
andrewheusser commented 6 years ago

hi @mivade - thanks for letting us know. this is a known issue with hdbscan/hypertools (supereeg depends on these) and we are working on the problem. in the meantime you might try installing cython before installing supereeg. that may or may not work for you, but let us know, thanks!

mivade commented 6 years ago

Here's the list of my conda environment:

$ conda list
# packages in environment at /Users/depalati/miniconda3/envs/cmlreaders:
#
# Name                    Version                   Build  Channel
alabaster                 0.7.10                    <pip>
appnope                   0.1.0            py36hf537a9a_0
attrs                     18.1.0                    <pip>
Babel                     2.5.3                     <pip>
backcall                  0.1.0                    py36_0
blas                      1.0                         mkl
bleach                    2.1.3                     <pip>
blosc                     1.14.3               hd9629dc_0
bokeh                     0.12.16                  py36_0
bptools                   1.3.0                    py36_0    pennmem
bzip2                     1.0.6                hd86a083_4
ca-certificates           2018.03.07                    0
cctools                   895                  h7512d6f_0
certifi                   2018.4.16                py36_0
chardet                   3.0.4                     <pip>
clang                     4.0.1                h662ec87_0
clang_osx-64              4.0.1               h1ce6c1d_11
clangxx                   4.0.1                hc9b4283_0
clangxx_osx-64            4.0.1               h22b1bf0_11
classiflib                0.1.2            py36h32f0f11_0    pennmem
click                     6.7              py36hec950be_0
cloudpickle               0.5.3                    py36_0
cmlreaders                0.4.0                     <pip>
codecov                   2.0.15                    <pip>
compiler-rt               4.0.1                h5487866_0
coverage                  4.5.1                     <pip>
cycler                    0.10.0           py36hfc81398_0
cython                    0.28.2           py36h1de35cc_0
cytoolz                   0.9.0.1          py36h1de35cc_0
dask                      0.18.1                   py36_0
dask-core                 0.18.1                   py36_0
dbus                      1.13.2               h760590f_1
decorator                 4.3.0                     <pip>
decorator                 4.3.0                    py36_0
deepdish                  0.3.6                     <pip>
distributed               1.22.0                   py36_0
docutils                  0.14                      <pip>
entrypoints               0.2.3                     <pip>
expat                     2.2.5                hb8e80ba_0
fftw                      3.3.8                h1de35cc_0
flake8                    3.5.0                     <pip>
freetype                  2.5.5                         2
future                    0.16.0                    <pip>
gettext                   0.19.8.1             h15daf44_3
gitdb2                    2.0.3                    py36_0
gitpython                 2.1.3                    py36_0
glib                      2.56.1               h35bc53a_0
graphviz                  2.38.0                        4
h5py                      2.7.0            py36h6400cee_1
hdbscan                   0.8.15                    <pip>
hdf5                      1.10.1               ha036c08_1
heapdict                  1.0.0                    py36_2
html5lib                  1.0.1                     <pip>
hypertools                0.5.0                     <pip>
icu                       58.2                 h4b95b61_1
idna                      2.6                       <pip>
imageio                   2.3.0                     <pip>
imagesize                 1.0.0                     <pip>
intel-openmp              2018.0.0                      8
ipykernel                 4.8.2                    py36_0
ipython                   6.4.0                    py36_0
ipython-genutils          0.2.0                     <pip>
ipython_genutils          0.2.0            py36h241746c_0
jedi                      0.12.0                   py36_1
jinja2                    2.10             py36hd36f9c5_0
Jinja2                    2.10                      <pip>
joblib                    0.11                     py36_0
jpeg                      9b                   he5867d9_2
jsonschema                2.6.0                     <pip>
jupyter-core              4.4.0                     <pip>
jupyter_client            5.2.3                    py36_0
jupyter_core              4.4.0            py36h79cf704_0
kiwisolver                1.0.1                     <pip>
ld64                      274.2                h7c2db76_0
libcxx                    4.0.1                h579ed51_0
libcxxabi                 4.0.1                hebd6815_0
libedit                   3.1.20170329         hb402a30_2
libffi                    3.2.1                h475c297_4
libgfortran               3.0.1                h93005f0_2
libiconv                  1.15                 hdd342a3_7
libpng                    1.6.34               he12f830_0
libsodium                 1.0.16               h3efe00b_0
libtiff                   4.0.9                hcb84e12_1
line_profiler             2.1.2            py36h1de35cc_0
llvm                      4.0.1                hc748206_0
llvm-lto-tapi             4.0.1                h6701bc3_0
llvmlite                  0.24.0                    <pip>
locket                    0.2.0            py36hca03003_1
logserver                 0.3.1                     <pip>
lzo                       2.10                 h362108e_2
MarkupSafe                1.0                       <pip>
markupsafe                1.0              py36h3a1e703_1
matplotlib                2.0.2               np113py36_0
matplotlib                2.2.2                     <pip>
mccabe                    0.6.1                     <pip>
mistune                   0.8.3                     <pip>
mkl                       2018.0.2                      1
mkl-service               1.1.2            py36h7ea6df4_4
mkl_fft                   1.0.1            py36h917ab60_0
mkl_random                1.0.1            py36h78cc56f_0
mne                       0.16.1                    <pip>
more-itertools            4.1.0                     <pip>
msgpack-python            0.5.6            py36h04f5b5a_0
nbconvert                 5.3.1                     <pip>
nbformat                  4.4.0                     <pip>
nbsphinx                  0.3.3                     <pip>
ncurses                   6.1                  h0a44026_0
nibabel                   2.3.0                     <pip>
nilearn                   0.4.2                     <pip>
numba                     0.39.0                    <pip>
numexpr                   2.6.5            py36h057f876_0
numpy                     1.13.3           py36ha9ae307_4
numpy                     1.14.3                    <pip>
numpy-base                1.14.3           py36h479e554_1
openssl                   1.0.2o               h26aff7b_0
packaging                 17.1                     py36_0
packaging                 17.1                      <pip>
pandas                    0.23.1           py36h1702cab_0
pandocfilters             1.4.2                     <pip>
parso                     0.2.0                    py36_0
partd                     0.3.8            py36hf5c4cb8_0
patsy                     0.5.0                    py36_0
pcre                      8.42                 h378b8a2_0
pexpect                   4.5.0                    py36_0
pickleshare               0.7.4            py36hf512f8e_0
Pillow                    5.2.0                     <pip>
pip                       10.0.1                   py36_0
pluggy                    0.6.0                     <pip>
ppca                      0.0.3                     <pip>
prompt_toolkit            1.0.15           py36haeda067_0
psutil                    5.4.5            py36h1de35cc_0
ptsa                      2.0.1                    py36_0    pennmem
ptyprocess                0.5.2            py36he6521c3_0
py                        1.5.3                     <pip>
pycodestyle               2.3.1                     <pip>
pyflakes                  1.6.0                     <pip>
Pygments                  2.2.0                     <pip>
pygments                  2.2.0            py36h240cd3f_0
pymc3                     3.2              py36h1e7238b_0
pyparsing                 2.2.0                     <pip>
pyparsing                 2.2.0            py36hb281f35_0
pyqt                      5.9.2            py36h11d3b92_0
pytables                  3.4.3            py36h5ca999c_0
pytest                    3.5.1                     <pip>
pytest-cov                2.5.1                     <pip>
python                    3.6.5                hc167b69_1
python-dateutil           2.7.3                    py36_0
pytz                      2018.4                   py36_0
pytz                      2018.4                    <pip>
pywavelets                0.5.2            py36h2710a04_0
pyyaml                    3.12             py36h2ba1e63_1
pyzmq                     17.0.0           py36h1de35cc_1
qt                        5.9.5                h02808f3_0
ramutils                  2.2.2            py36h39e3cac_0    pennmem
readline                  7.0                  hc1231fa_4
requests                  2.18.4                    <pip>
scikit-learn              0.19.1           py36hffbff8c_0
scipy                     1.0.0            py36h1de22e9_0
seaborn                   0.9.0                     <pip>
setuptools                39.1.0                   py36_0
simplegeneric             0.8.1                    py36_2
sip                       4.19.8           py36h0a44026_0
six                       1.11.0                    <pip>
six                       1.11.0           py36h0e22d5e_1
smmap2                    2.0.3                    py36_0
snappy                    1.1.7                he62c110_3
snowballstemmer           1.2.1                     <pip>
sortedcontainers          1.5.10                   py36_0
Sphinx                    1.7.4                     <pip>
sphinx-rtd-theme          0.3.1                     <pip>
sphinxcontrib-websupport  1.0.1                     <pip>
sqlite                    3.23.1               hf1716c9_0
statsmodels               0.8.0            py36h9c68fc9_0
supereeg                  0.1.1                     <pip>
tblib                     1.3.2            py36hda67792_0
testpath                  0.3.1                     <pip>
theano                    1.0.1            py36h04f5b5a_0
tk                        8.6.7                h35a86e2_3
toolz                     0.9.0                    py36_0
tornado                   5.0.2                    py36_0
tqdm                      4.23.3                   py36_0
traitlets                 4.3.2                     <pip>
traitlets                 4.3.2            py36h65bd3ce_0
traits                    4.6.0                    py36_0
traitschema               1.1.3                    py36_0    pennmem
umap-learn                0.3.0                     <pip>
urllib3                   1.22                      <pip>
wcwidth                   0.1.7            py36h8c6ec74_0
webencodings              0.5.1                     <pip>
wheel                     0.31.0                   py36_0
xarray                    0.9.6                    py36_0
xz                        5.2.3                h727817e_4
yaml                      0.1.7                hc338f04_2
zeromq                    4.2.5                h378b8a2_0
zict                      0.1.3            py36h71da714_0
zlib                      1.2.11               hf3cbc9b_2
andrewheusser commented 6 years ago

excellent, thanks!

andrewheusser commented 6 years ago

@mivade this should be resolved now if you upgrade hypertools to 0.5.1. Let me know if it doesn't work and I'll reopen the issue!

mivade commented 6 years ago

This resolved the issue for me. Thanks!