Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: No module named numpy.core._multiarray_umath on mac os 10.12 #192

Closed
copilco opened this issue Dec 11, 2019 · 2 comments
Closed
Labels
installation compilation, installation

Comments

@copilco
Copy link

copilco commented Dec 11, 2019

Hello

I managed to compile the code after some effort with macports. Now it compiles but when i run it shows an error with the numpy library.

As i have several python and numpy version installed i have created a conda enviroment to use python 2.7 with numpy 4.8.0

But the error keep showing when i run the code

(py27) dresden:Smilei camilo$ make env
SMILEICXX : /opt/local/bin/mpicxx
PYTHONEXE : python
MPIVERSION :
VERSION : v4.3-2-g442f29e7-master
OPENMP_FLAG : -fopenmp -D_OMP
HDF5_ROOT_DIR :
SITEDIR : /Users/camilo/.local/lib/python2.7/site-packages
PY_CXXFLAGS : -I/anaconda3/envs/py27/include/python2.7 -I/anaconda3/envs/py27/include/python2.7 -I/anaconda3/envs/py27/lib/python2.7/site-packages/numpy/core/include -DSMILEI_USE_NUMPY -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION
PY_LDFLAGS : -lpython2.7 -ldl -framework CoreFoundation -u _PyMac_Error
CXXFLAGS : -D__VERSION="v4.3-2-g442f29e7-master" -D_VECTO -std=c++11 -Wall -Isrc -Isrc/Checkpoint -Isrc/Collisions -Isrc/Diagnostic -Isrc/DomainDecomposition -Isrc/ElectroMagn -Isrc/ElectroMagnBC -Isrc/ElectroMagnSolver -Isrc/Field -Isrc/Interpolator -Isrc/Ionization -Isrc/Merging -Isrc/MovWindow -Isrc/MultiphotonBreitWheeler -Isrc/Params -Isrc/ParticleCreator -Isrc/ParticleInjector -Isrc/Patch -Isrc/picsar_interface -Isrc/Profiles -Isrc/Projector -Isrc/Pusher -Isrc/Python -Isrc/Radiation -Isrc/SmileiMPI -Isrc/Species -Isrc/Tools -Ibuild/src/Python -I/anaconda3/envs/py27/include/python2.7 -I/anaconda3/envs/py27/include/python2.7 -I/anaconda3/envs/py27/lib/python2.7/site-packages/numpy/core/include -DSMILEI_USE_NUMPY -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D_VECTO -O3 -g -fopenmp -D_OMP
LDFLAGS : -lhdf5 -lpython2.7 -ldl -framework CoreFoundation -u _PyMac_Error -lm -fopenmp -D_OMP
(py27) dresden:Smilei camilo$ export HDF5_ROOT_DIR=/opt/local/

(py27) dresden:Smilei camilo$ cd Test001/
(py27) dresden:Test001 camilo$ ls
tst1d_04_radiation_pressure_acc.py
(py27) dresden:Test001 camilo$ ../smilei tst1d_04_radiation_pressure_acc.py
_ _
___ _ | | _ \ \ Version : v4.3-2-g442f29e7-master
/ | _ __ () | | ___ () | |
__ \ | ' \ _ | | / -) _ | |
|
/ |||| || || ___| || | |
/_/

Reading the simulation parameters

HDF5 version 1.10.5
ImportError: No module named numpy.core._multiarray_umath
Stack trace (most recent call last):
#1 Object "smilei", at 0x1061e8e91, in main + 961
#0 Object "smilei", at 0x1060d1f17, in Params::Params(SmileiMPI*, std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > >) + 1127
Segmentation fault: 11
(py27) dresden:Test001 camilo$

@mccoys
Copy link
Contributor

mccoys commented Dec 11, 2019

numpy 4.8 ? The latest version is 1.17 ...

Anyways, this is an issue of versions of numpy vs other packages in your python installation. It has little to do with smilei. See for instance numpy/numpy#11871. Try to upgrade numpy : pip install --upgrade numpy

@copilco
Copy link
Author

copilco commented Dec 11, 2019

Fixed with pip install --upgrade numpy

@mccoys mccoys added the installation compilation, installation label Dec 11, 2019
@mccoys mccoys closed this as completed Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation compilation, installation
Projects
None yet
Development

No branches or pull requests

2 participants