On Tue, Apr 22, 2014 at 5:06 PM, Akshat Mahajan <[email protected]> wrote:
> Hi!
>
> The general problem: how does one go about installing modules (that are not
> shipped with Sage) for Python 2.x for Sage in Ubuntu?
>
> Why I'm asking this: I have to work with files in the hdf4 format. Now,
> there's a module called PyHDF that allows me to read hdf4 files using
> Python. However, I only have the Python that comes shipped with Sage, in a
> Ubuntu environment. I'd like to be able to install PyHDF to the Sage-shipped
> Python. How do I do that?
0. Install the necessary devel libraries for Ubuntu:
sudo apt-get install h5utils libhdf5-dev libhdf5-doc
1. Install PIP:
sage -sh
wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py;
python get-pip.py
NOTE -- this step 1 is silly -- we should include pip with Sage; sorry
we don't yet.
2. Install hdf5 module, and a few other things you likely want :
sage # start up sage
sage: os.environ['NETCDF4_DIR']='/usr/'; os.environ['HDF5_DIR']='/usr/';
sage: [(s, os.system("pip install %s"%s)) for s in 'pandas
statsmodels h5py netcdf4'.split()]
>
> Thank you so much!
>
> Yours,
> Akshat
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.
--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.