Ask Your Question
0

No Module "sage.all" or no module Pyfits

asked 2011-07-06 12:12:35 +0100

Frédéric gravatar image

Hello to all. I am trying to execute a python script on ubuntu with python 2.6. I would like to use two aditionnal module in the script sage and pyfits. But if i add the command line: from sage.all import *, i get the message no module named sage.all. I try to add, at the beginning of the script the line #!/usr/bin/env sage -python and now he found the sage module but not the module pyfits. Do you know how to have in both time the two modules ? Thanks in advance to all the answers. Any help will be sincerely appreciated. Cheers

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2011-07-06 13:17:18 +0100

benjaminfjones gravatar image

One solution is to use Sage's python (sage -python as you've done), but also you need to install pyfits so that Sage's python knows about it. This means finding the installation instructions for pyfits and do them using sage -python instead of your system installation of python:

1. download pyfits to /path/to/pyfits/
2. cd /path/to/pyfits
3. sage -python setup.py install

See also answers to this question.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2011-07-06 12:12:35 +0100

Seen: 1,043 times

Last updated: Jul 06 '11