Opened 10 years ago

Closed 9 years ago

#12926 closed defect (duplicate)

`sage -ipython` doesn't use the sage directory for ipython.

Reported by: itaibn Owned by: itaibn
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: interfaces Keywords: ipython
Cc: Merged in:
Authors: Reviewers: Jason Grout
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


The command sage -ipython uses ~/.ipython as it's configurations directory. This is probably not the intended behaviour, since programs installed through sage are not supposed to interfere with installed independently. In fact, if one installs the latest version of ipython and runs sage ipython it returns the following error message:

WARNING: Configuration file ipythonrc not found. Ignoring request.
Traceback (most recent call last):
  File "/home/itaibn/sage-5.0.beta7/local/lib/python2.7/site-packages/IPython/", line 66, in load
    fname = filefind(fname,incpath)
  File "/home/itaibn/sage-5.0.beta7/local/lib/python2.7/site-packages/IPython/", line 554, in filefind
    ' not found in current or supplied directories:' + `alt_dirs`
IOError: File'ipythonrc' not found in current or supplied directories:u'/home/itaibn/.ipython'

WARNING: Problems loading configuration file 'ipythonrc'
Starting with default -bare bones- configuration.

And then then continues with ipython in what is presumably the -bare bones- configuration.

Attachments (1)

patch-#12926 (868 bytes) - added by itaibn 10 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 follow-up: Changed 10 years ago by jhpalmieri

This is probably a duplicate of #12911.

Changed 10 years ago by itaibn

comment:2 in reply to: ↑ 1 Changed 10 years ago by itaibn

Replying to jhpalmieri:

This is probably a duplicate of #12911.

It seems similar, but I'm not sure. That ticket looks like it is about running something internal in sage rather the command-line interface, but it does seem similar.

comment:3 Changed 10 years ago by jhpalmieri

Maybe it's not a duplicate. Unfortunately, the "obvious" patch

  • spkg/bin/sage-env

    diff --git a/spkg/bin/sage-env b/spkg/bin/sage-env
    a b if [ "$SAGE_STARTUP_FILE" = "" ]; then 
    298298    export SAGE_STARTUP_FILE
     301IPYTHONDIR="$DOT_SAGE/ipython" && export IPYTHONDIR
    301303if [ -d "$SAGE_ROOT/local/lib/python" ]; then
    302304    PYTHONPATH="$SAGE_ROOT/local/lib/python"
    303305    if [ -n "$SAGE_PATH" ]; then

doesn't work: then sage --ipython has "sage: " as a prompt. I think that someone needs to improve how we deal with the IPython config files. See also #12167.

comment:4 Changed 9 years ago by jdemeyer

  • Milestone changed from sage-5.7 to sage-duplicate/invalid/wontfix
  • Resolution set to duplicate
  • Reviewers set to Jason Grout
  • Status changed from new to closed

Fixed by #12719.

Note: See TracTickets for help on using tickets.