Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I have recently installed ipython using Enthought's EPD python install - and when starting the iPython HTML notebook from the command prompt by typing:

ipython notebook --pylab=inline

I manage to get the localhost browser notebook screen pop up correctly.

However when I try to create a new notebook by clicking "New Notebook" I get the following error message:

"Creating Notebook Failed The error was: Unexpected error while autosaving notebook: C:\Windows\System32\Untitled0.ipynb [Errno 17] No usable temporary file name found"

I am assuming this i sbecause I may not have write privilege for that particular drive. So I have tried to go into the "ipython_notebook_config.py" file and change the following:

# The directory to use for notebooks and kernels.
c.NotebookApp.notebook_dir = u'C:\Users\Stuart\Documents\iPython' 
c.FileNotebookManager.notebook_dir = u'C:\Users\Stuart\Documents\iPython'

I have then closed down all the cmd windows and started the ipython notebook agaion. But when I click on "New Notebook" I get the same error message as before:

"Creating Notebook Failed The error was: Unexpected error while autosaving notebook: C:\Windows\System32\Untitled0.ipynb [Errno 17] No usable temporary file name found"

Could someone please help me as to how I can get this working? Any help very much appreciated.

Can you try switching to C:\Users\Stuart\Documents\iPython in the terminal before starting the notebook? Btw. it is recommended not to use --pylab inline see here why. – Jakob Nov 23, 2014 at 9:16 Changing the directory in the CMD before launching the notebook worked - I am now able to create Notebooks as normal. Thank you very much for your help. I tried to read the additional info your linked to - unfortunately I am a complete novice and it didn't really mean much to me. Maybe one day I'll understand! But thanks for your help with this, much appreciated!!! – s666 Dec 17, 2014 at 15:09

I also had the same problem, I was not able to create the new notebook or access existing notebook present in that directory.

Error Message - Unexpected error while saving file:/path/ database is locked

Turns out my old anaconda jupyter notebook terminals were open and running in the background. Every time I started jupyter notebook I used the new instance that led me to this problem. When I closed all terminals and restarted new Jupyter notebook terminal it started working again.

Many of the problems with Anaconda/Jupyter/Notebooks can be solved by examining and cleaning up what you have in your environmental variables such as Path or, if you trying to set up files to store Notebooks that you develop.

There is a very good discussion of environmental variables here:

http://johnatten.com/2014/12/07/adding-and-editing-path-environment-variables-in-windows/

It is obvious that if Anaconda/Jupyter/Notebook can't find the files they can't run them.

At a minimum your path in environmental variables should contain:

c:\users\*******\Anaconda3  where ******** is your user name
c:\users\*******\Anaconda3\Scripts

then you could create environmental variables that point to your personal Notebook code directories: (note: there can't be any spaces in the addresses) in Windows Environmental Variables (System Properties --> Environmental Variables --> add to User and System variables

variable  value
NOTEBOOK  address of your personal Notebook location
TESTING   address of your Notebook Testing location

With this setup you can on the Anaconda Command

 jupyter notebook %TESTING%
    jupyter notebook %NOTEBOOK%

Another way you can go to your own Notebook directory is to change

jupyter_notebook_config.py

Go to:

 ## The directory to use for notebooks and kernels.
 c.NotebookApp.notebook_dir = 'your Notebook directory address goes here'

remove the ## and enter your directory using \'s instead of \ in the address

Then anytime you enter 'jupyter notebook' you will start at your Notebook Directory.

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.