scripts.mit.edu

MIT SIPB Script Services for Athena

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
Previous:
Next:
© 2004-2020, the SIPB scripts.mit.edu project.
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 busy-beaver.mit.edu.