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

Import error with numpy.dot #1346

Open
nth29 opened this issue Aug 24, 2019 · 7 comments
Open

Import error with numpy.dot #1346

nth29 opened this issue Aug 24, 2019 · 7 comments

Comments

@nth29
Copy link

nth29 commented Aug 24, 2019

After compiling the following example test_pythran.py
"""
import numpy as np
#pythran export mytest(float[],float[:,:])
def mytest(a,b):
res = np.dot(a,b)
return res
"""
with command :

pythran test_pythran.py

then, import test_pythran in python fails with the following error

"""

import test_pythran
Traceback (most recent call last):
File "", line 1, in
ImportError: ./test_pythran.so: undefined symbol: _Z11cblas_dgemv11CBLAS_ORDER15CBLAS_TRANSPOSEiidPKdiS2_idPdi
"""
Pythran version : 0.9.3
Python version : 2.7.16
Operating System: Debian GNU/Linux 10 (buster)
Kernel: Linux 4.19.0-5-amd64
Architecture: x86-64

@nth29
Copy link
Author

nth29 commented Aug 24, 2019

numpy version : 1.16.2

@serge-sans-paille
Copy link
Owner

Do you have libatlas-base-dev installed?

@serge-sans-paille
Copy link
Owner

(you should use python3 btw, python2 support ends at then end of 2019)

@nth29
Copy link
Author

nth29 commented Aug 24, 2019

Yes libatlas-base-dev is installed (version 3.10.3-8).
(Sure we should go to python3 but this is some work to convert a big python2 project to python3 and test that all is ok...)

@serge-sans-paille
Copy link
Owner

Can you try to install openblas and to add this to your '~/.pythranrc` :

[compiler]
blas=openblas

@nth29
Copy link
Author

nth29 commented Aug 26, 2019

Yes, this solves the issue.

@serge-sans-paille
Copy link
Owner

Good to knwo. I'll still have a loo to the atlas issue later on, thus not closing the issue.

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

No branches or pull requests

2 participants