1

I am just getting started trying to learn Python for course assignments. Our teacher has mandated using iPython notebooks, so I have installed Enthought Python AND ipython on my Mac.

The iPython home directory is /users/me/.ipython

I have used the ipython profile create command to create the file

.ipython/profile_default/ipython_config.py

but I don't know how to access this file or what to put in it. My objective is to set the default file path to:

/users/me/documents/classes/analytics/hw1

so that code in my ipython notebook will automatically know where to look for data files.

Please help!

Thomas K
40.7k7 gold badges88 silver badges89 bronze badges
asked Jan 26, 2013 at 17:24

1 Answer 1

4

You can change the default path to your notebook files. Search in ipython_notebook_config.py for a setting notebook_dir.

The default folder for accessing files is the folder that your notebook is in. If you need to change that, then at the start of the notebook, add a command like this:

%cd /users/me/documents/classes/analytics/hw1
answered Jan 27, 2013 at 13:08
Sign up to request clarification or add additional context in comments.

1 Comment

I'll just leave this comment hear for future searchers: if you can't find a file named ipython_notebook_config.py, it means you are using the default profile with no customizations. You can continue to use the default profile, but create a config file you can edit, by typing the following at the system command prompt: ipython profile create

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.