nathanshammah / piqs

Permutational Invariance Quantum Solver for Lindblad open quantum system dynamics
BSD 3-Clause "New" or "Revised" License
17 stars 8 forks source link

'numpy/arrayobject.h' file not found #59

Closed joseraulgonzalez closed 6 years ago

joseraulgonzalez commented 6 years ago

I have installed both piqs and qutip via source compilation in MacOS 10.13.6. I am using Qutip 4.3.1 and piqs 1.2. If I run the following from qutip import * from qutip.piqs import * I get an error message:

fatal error: 'numpy/arrayobject.h' file not found

include "numpy/arrayobject.h"

Could someone please help me fix this?

quantshah commented 6 years ago

Hi, this seems to be mostly related to incorrect numpy installation or a mismatch. Could you remove qutip, update your numpy and try again?

Alternatively, the best way to manage packages would be using anaconda. You could install Miniconda and reinstall qutip with conda install -c conda-forge qutip. This way all your packages will be kept updated and in sync. Since numpy as well as qutip rely on some C/C++ bindings, sometimes installing the incorrect binaries can lead to this type of errors.

On Sun, Jul 22, 2018, 12:12 PM yosefrajwulf notifications@github.com wrote:

I have installed both piqs and qutip via source compilation in MacOS 10.13.6. I am using Qutip 4.3.1 and piqs 1.2. If I run the following

from qutip import from qutip.piqs import I get an error message: fatal error: 'numpy/arrayobject.h' file not found

include "numpy/arrayobject.h"

Could someone please help me fix this?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nathanshammah/piqs/issues/59, or mute the thread https://github.com/notifications/unsubscribe-auth/AGpUBG4ewh8l4GXF0HUV5Mc3W3yTzqSIks5uI-2tgaJpZM4VZ1-g .

joseraulgonzalez commented 6 years ago

Reinstalling did not work for me. However, a workaround that did work (a vile hack one might say) is the following: 1) cd /usr/local/include 2) ln -s /usr/local/lib/python2.7/site-packages/numpy/core/include/numpy numpy

joseraulgonzalez commented 6 years ago

Thanks for the help @sahmed95 ! I will close the issue now.

quantshah commented 6 years ago

Great. In future, conda might be helpful. Let us know if you face any more issues.

On Sun, Jul 22, 2018, 2:21 PM yosefrajwulf notifications@github.com wrote:

Closed #59 https://github.com/nathanshammah/piqs/issues/59.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/nathanshammah/piqs/issues/59#event-1746307755, or mute the thread https://github.com/notifications/unsubscribe-auth/AGpUBM1Cwf1z8o9lnCnpyMAYcUq405yMks5uJAvxgaJpZM4VZ1-g .

nathanshammah commented 6 years ago

Thank you @sahmed95 and thanks for getting in touch here @yosefrajwulf.