giganano / VICE

A python package designed to run numerical simulations of galactic chemical evolution
MIT License
23 stars 5 forks source link

ModuleNotFoundError: No module named 'vice.core._wrapper' #1

Closed moustakas closed 5 years ago

moustakas commented 5 years ago

Doing:

  conda create -n vicetest python=3 cython numpy dill jupyterlab
  conda activate vicetest
  cd /usr/local/share
  git clone https://github.com/giganano/VICE.git
  cd VICE ; make
  python setup.py install 

and then running the quick-start tutorial crashes with the error below.


---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-a079d0ba8e4c> in <module>
      1 from __future__ import print_function
      2 import numpy as np # we'll use numpy for the demonstration, but VICE does not need it
----> 3 import vice
      4 sz = vice.singlezone()
      5 sz.settings() # Just prints the current settings

/usr/local/anaconda3/envs/test/lib/python3.7/site-packages/VICE-1.0.0-py3.7.egg/vice/__init__.py in <module>
     90         __all__ = ["__author__", "__version__", "yields"]
     91 
---> 92         from .core import *
     93         from ._build_utils import *
     94         from . import yields

/usr/local/anaconda3/envs/test/lib/python3.7/site-packages/VICE-1.0.0-py3.7.egg/vice/core/__init__.py in <module>
      6 
      7 from __future__ import absolute_import
----> 8 from ._wrapper import *
      9 from ._globals import *
     10 from ._data_utils import *

ModuleNotFoundError: No module named 'vice.core._wrapper'
moustakas commented 5 years ago

Oh, the tests actually fail, so it's gotta be a compile failure.

(test) ioannis@atlas:/usr/local/share/VICE% make clean
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C vice/_build_utils/ clean
rm -f build_data.obj
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C vice/core/ clean
rm -f *.c
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C vice/yields/agb/ clean
rm -f grid.c 
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C vice/yields/ccsne/ clean
rm -f yield_integrator.c
rm -f yield_integrator.so
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C vice/yields/sneia/ clean
rm -f yield_calculations.c
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C vice/src/ clean 
rm -f *.o 
rm -f *.so 
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C vice/ clean 
rm -f *.out 
rm -rf *.vice 
rm -rf *.egg-info
rm -rf dist
rm -rf build
(test) ioannis@atlas:/usr/local/share/VICE% make tests
cd vice && python tests && cd - 
Traceback (most recent call last):
  File "/usr/local/anaconda3/envs/test/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/anaconda3/envs/test/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "tests/__main__.py", line 5, in <module>
    from test_agb_yields import main as test_agb_yields 
  File "tests/test_agb_yields.py", line 3, in <module>
    from vice.yields.agb import grid 
  File "/usr/local/anaconda3/envs/test/lib/python3.7/site-packages/VICE-1.0.0-py3.7.egg/vice/__init__.py", line 9, in <module>
    from .core import * 
  File "/usr/local/anaconda3/envs/test/lib/python3.7/site-packages/VICE-1.0.0-py3.7.egg/vice/core/__init__.py", lne 8, in <module>
    from ._wrapper import * 
ModuleNotFoundError: No module named 'vice.core._wrapper'
make: *** [tests] Error 1
giganano commented 5 years ago

This error arises from installing VICE in a conda environment. If importing VICE fails, an error message now prints from the setup files stating that this may be the source.