numba / pyculib

Pyculib - Python bindings for CUDA libraries
BSD 2-Clause "Simplified" License
97 stars 11 forks source link

module 'numba.findlib' has no attribute 'get_lib_dir' #29

Open chenminhua opened 5 years ago

chenminhua commented 5 years ago

Hi, I got this problem when I try to use pyculib.

`

from pyculib import rand as curand Traceback (most recent call last): File "", line 1, in File "/home/chenmh/anaconda3/envs/tensorflow/lib/python3.6/site-packages/pyculib/init.py", line 49, in from . import blas, sparse, fft, rand, sorting File "/home/chenmh/anaconda3/envs/tensorflow/lib/python3.6/site-packages/pyculib/sorting/init.py", line 1, in from .radixsort import RadixSort File "/home/chenmh/anaconda3/envs/tensorflow/lib/python3.6/site-packages/pyculib/sorting/radixsort.py", line 38, in lib = load_lib('radixsort') File "/home/chenmh/anaconda3/envs/tensorflow/lib/python3.6/site-packages/pyculib/sorting/common.py", line 24, in load_lib libpath = os.path.join(findlib.get_lib_dir(), fullname) AttributeError: module 'numba.findlib' has no attribute 'get_lib_dir' `

following is the versions of pkgs

numba 0.44.1 py36h962f231_0 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main pyculib 1.0.2 np113py36_2 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free pyculib_sorting 1.0.0 8 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free

chenminhua commented 5 years ago

I found that there is no 'get_lib_dir' method in numba.findlib

from numba import findlib dir(findlib) ['DLLNAMEMAP', 'RE_VER', 'builtins', 'cached', 'doc', 'file', 'loader', 'name', 'package', 'spec', 'absolute_import', 'find_file', 'find_lib', 'get_lib_dirs', 'os', 'print_function', 're', 'sys']

letalvoj commented 5 years ago

@chenminhua install numba<=0.42.1

jeng1220 commented 5 years ago

The function name in Numba should be get_lib_dirs instead of get_lib_dir.