Windows10下深度學(xué)習(xí)環(huán)境配置

1. Windows 中command prompt找不到conda

這個(gè)問題的解決方法是在安裝的時(shí)候勾選添加環(huán)境變量


如果還是不行就手動(dòng)在anaconda加入path

第一步:右鍵 “我的電腦” 找到 Properties,打開如下圖

第二步:選擇 Advanced system settings, 找到環(huán)境變量

第三步: 找到PATH,新建路徑 添加
C:\Users\你的用戶名\Anaconda3\Scripts
C:\Users\你的用戶名\Anaconda3

具體路徑請?jiān)陂_始欄中搜索Anaconda Prompt,找到后輸入where conda即可顯示路徑。

2. Windows 下 conda 安裝Keras報(bào)錯(cuò)

conda install keras 完成Keras安裝后會(huì)報(bào)出一些列警告和錯(cuò)誤,顯示如下:

(py36) C:\Users\Ido>set "KERAS_BACKEND="

(py36) C:\Users\Ido>python C:\Users\Ido\AppData\Local\conda\conda\envs\py36\etc\keras\load_config.py  1>temp.txt

(py36) C:\Users\Ido>set /p KERAS_BACKEND= 0<temp.txt

(py36) C:\Users\Ido>del temp.txt

(py36) C:\Users\Ido>python -c "import keras"  1>nul 2>&1

(py36) C:\Users\Ido>if errorlevel 1 (
ver  1>nul
 set "KERAS_BACKEND=theano"
 python -c "import keras"  1>nul 2>&1
)

(py36) C:\Users\Ido>SET DISTUTILS_USE_SDK=1

(py36) C:\Users\Ido>SET MSSdk=1

(py36) C:\Users\Ido>SET platform=

(py36) C:\Users\Ido>IF /I [AMD64] == [amd64] set "platform=true"

(py36) C:\Users\Ido>IF /I [] == [amd64] set "platform=true"

(py36) C:\Users\Ido>if defined platform (set "VSREGKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0" )  ELSE (set "VSREGKEY=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0" )

(py36) C:\Users\Ido>for /F "skip=2 tokens=2,*" %A in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0" /v InstallDir') do SET "VSINSTALLDIR=%B"
ERROR: The system was unable to find the specified registry key or value.

(py36) C:\Users\Ido>if "" == "" (set "VSINSTALLDIR=" )

(py36) C:\Users\Ido>if "" == "" (
ECHO "WARNING: Did not find VS in registry or in VS140COMNTOOLS env var - your compiler may not work"
 GOTO End
)
"WARNING: Did not find VS in registry or in VS140COMNTOOLS env var - your compiler may not work"
The system cannot find the batch label specified - End

目前對我可行的辦法是不要用conda安裝Keras
創(chuàng)建conda 環(huán)境后,激活,然后用pip安裝keras.

$ conda create --name python36 python=3.6
$ conda activate python36
$ pip install keras

3. Tables模塊缺失

安裝完pytables后我們在.py文件中測試以下代碼

import tables
tables.test()

雖然顯示該環(huán)境下已經(jīng)成功安裝了tables
ImportError: DLL load failed: The specified module could not be found.
查了無數(shù)資料和答案,最后的解決辦法是下載.whl來安裝
下載地址 https://www.lfd.uci.edu/~gohlke/pythonlibs/ , 搜索pytables,選擇對應(yīng)的版本。我是Windows10,64bit,下載了tables?3.5.2?cp36?cp36m?win_amd64.whl.安裝命令如下:

$ pip install directory/path/tables?3.5.2?cp36?cp36m?win_amd64.whl
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容