- 打開anaconda navigator,並在environments中create一個新的環境,命名爲TensorFlow,然後在右邊尋找TensorFlow包並且安裝,再依次安裝matplotlib和keras,再進入home,打開TensorFlow環境下的jupyternotebook即可。
在anaconda的命令提示符中安裝的一些語句
conda search --full -name tensorflow
conda info tensorflow
python --version
activate tensorflow
conda create --name tfenv python=3.6
pip install --upgrade --ignore-installed tensorflow
- 我運行import tensorflow as ts,會報cannot import name 'abs’這個錯,然後卸載tensorflow環境,安裝一遍,還是沒用,就卸載了anaconda,重新安裝anaconda,但是新建了tensorflow環境後,在home安裝了jupyter後,又無法啓動jupyter內核,所以我乾脆刪除tensorflow環境,在base環境下安裝tensorflow包,運行自帶的jupyter,能正常運行!