1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

faiss-gpuがhas no attribute エラーをはくときの対処

1
Posted at

環境

Ubuntu: 18.04
Anaconda:
cuda 9.0

faiss-gpuをcondaでインストールした(conda install faiss-gpu -c pytorch)ときに、
$ import faiss
は通るのだが、faissの関数を使おうとするとhas no attributeエラーが出されてしまっていた。

もちろんcudaのインストールはできている。
$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2017 NVIDIA Corporation
Built on Fri_Sep__1_21:08:03_CDT_2017
Cuda compilation tools, release 9.0, V9.0.176

解決策

$ conda install faiss-gpu cuda90 -c pytorch
このようにすることでfaissがつかえるようになった。

考察

最初anacondaでcuda環境を使用する際のドライバ的なものを入れていなかったのかとも考えたが、であればpytorchでgpu環境を今まで使えていたのが謎。同社製なので、、
ともあれ使えるようにはなったが、anacondaで入れたcudaライブラリは何だったのだろうか、。
そのへんご存知の方教えていただければ幸いです。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?