问题描述
我是使用Colab的新手,无法找到任何使它工作的东西。有人可以帮我解决它或分享解决方案吗?
!git clone https://github.com/droyed/eucl_dist.git
!pip install pycuda
!pip install scikit-cuda
使用
from eucl_dist.gpu_dist import dist as gdist
>ModuleNotFoundError Traceback (most recent call last)
<ipython-input-2-3a47b1a9783d> in <module>()
----> 1 from eucl_dist.gpu_dist import dist as gdist
ModuleNotFoundError: No module named 'eucl_dist.gpu_dist'
或
from eucl_dist.eucl_dist.gpu_dist import dist as gdist
>ModuleNotFoundError Traceback (most recent call last)
<ipython-input-3-b8b89f98116e> in <module>()
----> 1 from eucl_dist.eucl_dist.gpu_dist import dist as gdist
/content/eucl_dist/eucl_dist/gpu_dist.py in <module>()
3 import skcuda.linalg as culinalg
4 import skcuda.misc as misc
----> 5 from eucl_dist.gpu_supp import sq_sums,squared_sum,convert_f32
6
7 culinalg.init()
ModuleNotFoundError: No module named 'eucl_dist.gpu_supp'
非常感谢!
解决方法
再次在“ eucl_dist”下有一个名为“ eucl_dist”的子文件夹。
因此,您必须访问'./eucl_dist/eucl_dist/gpu_dist'
尝试这个。
%cd eucl_dist
from eucl_dist.gpu_dist import dist as gdist
%cd ..