Ask Your Question
1

ImportError: No module named 'sage'

asked 2016-08-10 17:00:51 -0600

k1monfared gravatar image

updated 2016-08-11 05:25:10 -0600

I had a Sage 6.5 installed from the repository, running on my Fedora 22 nicely. But today when I went to run it I get the following error:

sage
┌────────────────────────────────────────────────────────────────────┐
│ Sage Version 6.5, Release Date: 2015-02-17                         │
│ Type "notebook()" for the browser-based notebook interface.        │
│ Type "help()" for help.                                            │
└────────────────────────────────────────────────────────────────────┘
Traceback (most recent call last):
  File "/usr/lib64/sagemath/local/bin/sage-ipython", line 6, in <module>
    from sage.repl.interpreter import SageTerminalApp
ImportError: No module named 'sage'

I reinstalled Sage, but I still get the same error. Any ideas on why do I get this error and how to resolve it?

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
1

answered 2016-08-11 05:26:00 -0600

edit flag offensive delete link more

Comments

Yes, that does it. Anaconda had added a path to my bashrc. After deleting it sage started working. Thanks.

k1monfared gravatar imagek1monfared ( 2016-08-11 11:28:19 -0600 )edit
1

answered 2016-08-11 11:29:49 -0600

k1monfared gravatar image

As slelievre pointed it out there was a path added to my .bashrc file after installing anaconda. After removing that line sage started working.

edit flag offensive delete link more

Comments

What line should I remove? And, I can't find this file. Is it the same as .bash_profile?

roi.holtzman gravatar imageroi.holtzman ( 2016-10-24 03:34:45 -0600 )edit

@k1monfared do you know what should I do if I don't see this file?

roi.holtzman gravatar imageroi.holtzman ( 2016-11-11 02:37:57 -0600 )edit

@roi.holtzman yes, I believe they are the same. Here is a more in depth explanation: http://www.joshstaiger.org/archives/2...

k1monfared gravatar imagek1monfared ( 2016-11-22 15:25:04 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-08-10 17:00:51 -0600

Seen: 808 times

Last updated: Aug 11 '16