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
498 views
in Technique[技术] by (71.8m points)

python - Anaconda Prompt Stuck/Closing after Keras installation

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]Anaconda3etckerasload_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 users 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.

So, is my folder name having a space the root of the issue? If it is, how do I change it without messing up my computer? If it isn't, do you guys have any ideas of what is the solution to this? Thank you so much, I have two projects due in just a few days :(

See Question&Answers more detail:os

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

1 Reply

0 votes
by (71.8m points)

After a few days of searching, I found an alternative solution.

  1. Open Anaconda Navigator

  2. Click on Environments tab ( as shown in the picture)enter image description here

  3. Click base(root) (triangle icon) and then click on Open Terminalenter image description here

By using this solution, you'll be able to open Anaconda Prompt window and do whatever you want with Anaconda Prompt. enter image description here


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

...