LoginSignup
0
2

More than 5 years have passed since last update.

tensorflow,anacondaではimportできたのに,VScode(Jupyter)ではできないときのメモ

Posted at

問題

Ubuntu16.04でtensorflow-gpuをインストールした。
anacondaの仮想環境上ではimportできたのに,VScode(Jupyter)からはimportできない!!!!:frowning2:

原因

Anaconda上でのPythonパスとJupyter上でのPythonパスが一致していないらしい。
超参考にしたサイト➡https://qiita.com/tk_01/items/9d3961e386714b67f732

直し方

tensorflowをインストールした仮想環境をアクティベートして,

仮想環境をアクティベート
$ source activate <環境名>

以下のコマンドを実行。

Jupyterのkernelを作成
(環境名)$ conda install notebook ipykernel
(環境名)$ ipython kernel install --user --name <環境名> --display-name <jupyter上の表記を設定>

これでもう一度importしたらうまくいった!:laughing:

0
2
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
0
2