scalene icon indicating copy to clipboard operation
scalene copied to clipboard

'ImportError: numpy.core.multiarray failed to import' when using scalene

Open zuble opened this issue 1 year ago • 1 comments

Hii

The script i am running imports the essentia module just fine running alone ( built following this )

However when trying to profile with scalene --reduced-profile es.py it gives the following error:

Unable to import NumPy C API from Essentia module. Error code = -1
Error in program being profiled:
 numpy.core.multiarray failed to import
Traceback (most recent call last):
  File "/home/zu/anaconda3/envs/zugpu/lib/python3.8/site-packages/scalene/scalene_profiler.py", line 1835, in profile_code
    exec(code, the_globals, the_locals)
  File "es.py", line 4, in <module>
    import essentia.standard as es
  File "/usr/local/lib/python3.8/site-packages/essentia/__init__.py", line 1, in <module>
    from . import _essentia
ImportError: numpy.core.multiarray failed to import
Scalene: Program did not run for long enough to profile.
NOTE: The GPU is currently running in a mode that can reduce Scalene's accuracy when reporting GPU utilization.
Run once as Administrator or root (i.e., prefixed with `sudo`) to enable per-process GPU accounting.

I am running in ubuntu 16.04 lts and installed scalene with conda

zuble avatar Apr 06 '23 17:04 zuble

Same error on Windows 10, the script imports numpy and pandas. I updated the conda enviroment with latest pandas, numpy and scalene

LuchiLucs avatar Apr 12 '23 11:04 LuchiLucs