微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Colab无法如何从git导入文件

如何解决Colab无法如何从git导入文件

我是使用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 ..

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。