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

numpy.core.multiarray failed to import (Question) #63

Closed
BerrebiHuji opened this issue Apr 29, 2021 · 9 comments
Closed

numpy.core.multiarray failed to import (Question) #63

BerrebiHuji opened this issue Apr 29, 2021 · 9 comments
Labels

Comments

@BerrebiHuji
Copy link

BerrebiHuji commented Apr 29, 2021

Hey,
I used Conda instead of pip to download the package.
There's an error running the notebook code:

atom=Caesium()

`
C:\ProgramData\Anaconda3\lib\site-packages\arc\alkali_atom_functions.py in init(self, preferQuantumDefects, cpp_numerov)
200
201 if self.cpp_numerov:
--> 202 from .arc_c_extensions import NumerovWavefunction
203 self.NumerovWavefunction = NumerovWavefunction
204

ImportError: numpy.core.multiarray failed to import`

As I have read other issues, the problem is with the C compiler, but the answers have only addressed pip users.

(I'm using python 3.8)

@BerrebiHuji BerrebiHuji changed the title numpy.core.multiarray failed to import numpy.core.multiarray failed to import (Question) Apr 29, 2021
@nikolasibalic
Copy link
Owner

Hello @BerrebiHuji

Conda ARC package is old and outdated. I will try to delete that old package there not to cause future confusion.

Could you please get ARC with pip ? That should work. Let me know.

@nikolasibalic
Copy link
Owner

Hi @BerrebiHuji , I am also bit confused how you installed ARC with conda - could you please share that I would be interested ? Because conda package of ARC that I made long time ago has been deleted (I verified now), and I don't see someone else maintains ARC conda package (I checked on anaconda.org).

In any case supported installation method is via pip, and there are pre-build wheels for all current OS and Python versions (if something is missing, please let me know and I can add; Windwos Python 3.8 is supported there currently, which I think you have).

@BerrebiHuji
Copy link
Author

BerrebiHuji commented Apr 29, 2021

@nikolasibalic
I appreciate your quick response!

You are right, it turns out I used the pip command in my anaconda environment to install the package and I got confused over that.
(In other words, my python (Pycharm) interpreter is my anaconda 'root' environment)

After removing the package and reinstalling it again (using pip), my problem persists.
Attached is the error message which I am getting

image

@nikolasibalic
Copy link
Owner

@BerrebiHuji
Could you please let me know what numpy version you have ?
Last time we had this it was version problem so have to check that.

@nikolasibalic
Copy link
Owner

Please check if updating numpy to the latest version in conda resolves this. (should be 1.19.2)

@BerrebiHuji
Copy link
Author

my version is 1.19.2
image

@nikolasibalic
Copy link
Owner

Thanks, I will switch on Windows machine to try to reproduce this. Will let you know.

@nikolasibalic
Copy link
Owner

nikolasibalic commented Apr 29, 2021

@BerrebiHuji
I was able to reproduce your problem on Windows 10, Python 3.8, fresh Anaconda installation.

Looking online I found that this is common problem with numpy 1.19.2. it seems on Windows as multiple packages report this on stackoverflow (see this). It is very similar to problem we had on Windows and conda with 1.16 before (issue #25 ). Solution is to update numpy, but since conda channel doesn't have latest numpy, you should use conda-forge.

I solved it with

conda uninstall numpy
conda install -c conda-forge numpy scipy sympy mpmath

If any additional missing packages are reported after numpy uninstall, just install them too.

Please let me know: does this works for you ?

@BerrebiHuji
Copy link
Author

Yes!
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants