Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
543 views
in Technique[技术] by (71.8m points)

python - Error when installing keras in anaconda. /p KERAS_BACKEND= 0<temp.txt

I was creating a new env in anaconda and after installing spyder, tensorflow and theano I attempted to install keras but I got an error message (see below). Now I cannot even open spyder as it stops working. Spyder only works if I uninstall keras again.

Do you have any idea what could be going on? I have another env in this same computer that works perfectly with the same packages installed.

(py36) C:UsersLeicaMicroscope>conda install -c conda-forge keras
Solving environment: done

## Package Plan ##

  environment location: C:UsersLeicaMicroscopeAnaconda3envspy36

  added / updated specs:
    - keras


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    certifi-2018.4.16          |           py36_0         143 KB  conda-forge

The following NEW packages will be INSTALLED:

    keras:           2.1.6-py36_0      conda-forge

The following packages will be UPDATED:

    ca-certificates: 2018.03.07-0                  --> 2018.4.16-0      conda-fo
rge
    certifi:         2018.4.16-py36_0              --> 2018.4.16-py36_0 conda-fo
rge
    openssl:         1.0.2o-h8ea7d77_0             --> 1.0.2o-vc14_0    conda-fo
rge [vc14]

Proceed ([y]/n)? y


Downloading and Extracting Packages
certifi-2018.4.16    |  143 KB | ###################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

(py36) C:UsersLeicaMicroscope>set "KERAS_BACKEND="

(py36) C:UsersLeicaMicroscope>python C:UsersLeicaMicroscopeAnaconda3envsp
y36etckerasload_config.py  1>temp.txt

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

(py36) C:UsersLeicaMicroscope>del temp.txt

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

(py36) C:UsersLeicaMicroscope>if errorlevel 1 (
ver  1>nul
 set "KERAS_BACKEND=theano"
 python -c "import keras"  1>nul 2>&1
)
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

It may sound really obvious, but did you try installing it with pip ?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...