How do I make IPython or manage.py shell work on scripts.mit.edu?
IPython, a nicer interactive Python shell that is, among other things, used by Django’s “manage.py shell” command, doesn’t work by default on scripts.mit.edu because it isn’t able to write to your ~/.ipython directory. Assuming you don’t already use IPython on Athena, you can create a ~/.ipython directory that will work on scripts as follows, replacing LOCKER with the name of your locker:
- Create a temporary ~/.ipython directory and make it accessible to scripts via
mkdir /mit/LOCKER/.ipython
fs sa /mit/LOCKER/.ipython daemon.scripts write - Log in to scripts (ssh LOCKER@scripts) and run ipython. Because the .ipython directory exists and is writable, ipython will be able to start, but will not configure itself completely.
- Run the command __IP.user_setup('/mit/LOCKER/web_scripts/.ipython','','install') to create a completely-configured default IPython setup in your web_scripts directory, which is writable from scripts.mit.edu.
- Log out of scripts. Remove the temporary ~/.ipython directory and move the real one in place with
rm -r /mit/LOCKER/.ipython
mv /mit/LOCKER/web_scripts/.ipython /mit/LOCKER
![](https://scripts.mit.edu/images/1.gif)
Previous: | How can I install Python modules in my locker? |
Next: | How do I enable additional PHP extensions? |
These pages may be reused under either the GFDL 1.2 or CC-BY-SA 3.0.
Questions? Contact scripts@mit.edu.
You are currently connected to bees-knees.mit.edu.