1

So I recently downloaded Keras through the Anaconda prompt (I've downloaded other packages successfully). It actually worked, as I was able to import Keras in Jupyter Notebook. However, now I get the following issue when I open the Anaconda prompt:

C:\Users\[User Name]>python C:\Users\[User Name]\Anaconda3\etc\keras\load_config.py  1>temp.txt
    python: can't open file 'C:\Users

\[User]': [Errno 2] No such file or directory

C:\Users\[User Name]>set /p KERAS_BACKEND= 0<temp.txt

C:\Users\[User Name]>del temp.txt

C:\Users\[User Name]>python -c "import keras"  1>nul 2>&1

Things to Note:

At first, I simply cannot type or enter anything into the window. After closing and reopening it, the same message opens up, but is followed by a bunch of text I can't read because the window immediately closes afterward. In the error message provided, the third line has [User] instead of user. That is because my user's folder name on my computer is "FirstName LastName". There is a space which I'm wondering might be the issue. I don't want to uninstall Anaconda, as I have a project due in a few days and don't want any installation/loss of data issues.

2 Answers 2

0

Yes, the space in your user name is the issue.  If your user name is Jay kishan Panjiyar, type

python "C:\Users\Jay kishan Panjiyar\Anaconda3\etc\keras\load_config.py"  > temp.txt

at the prompt, using quotes to tell the system that that string with spaces in it is all one filename.  Or, if you're in your home directory (C:\Users\Jay kishan Panjiyar) when you do this (as your illustration suggests), it should be good enough to say

python Anaconda3\etc\keras\load_config.py  > temp.txt

P.S. Plain > is equivalent to 1>.

0

This problem is faced by many Python developers. Don't worry and try to resolve it by following below guidelines -

1.Uninstall Keras first (you can delete keras files by going inside folder where package is installed)

2.goto the location C:\Users\username\AppData\Local\Continuum\anaconda3\etc\conda\activate.d

You can see the keras batch files inside in both activate.d and deactivate.d, which runs every time the anaconda prompt is opened.DELETE them.

3.Reinstall Keras.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .