Installing numpy

22 views
Skip to first unread message

Jacob Fullerton

unread,
Jul 18, 2016, 3:14:00 PM7/18/16
to Tethys Platform
This is a suggestion as far as the documentation goes. I attempted to install the numpy library to my Ubuntu station so that I could use the numpy functionality in my tethys app. What I discovered is that if you use the "$ apt-get install python-numpy" tethysplatform cannot find the numpy module. The only way I've found the numpy module to work with tethys is using the "$ pip install numpy" command for Ubuntu 14.04. Would be helpful to people who want to run their models using numpy functionality.

Maybe it would work if I did the apt-get install before installing tethys, but I haven't tried that yet. I doubt it would work though.

swainn

unread,
Jul 18, 2016, 4:36:39 PM7/18/16
to Tethys Platform
Makes sense. apt-get would probably install numpy to the system Python installation. To install to the Tethys Python, you need to activate the Tethys virtual environment and then use pip or easy_install. I think it would be useful to mention in the docs somewhere that to install other Python dependencies, you need to activate your virtual environment and use pip.

I had a thought somewhat related to this and I'd be interested to see what others think. We potentially could add a number of commonly used Python packages to the list of dependencies that are installed with Tethys. Which ones would be useful? Numpy? GDAL? Others?

Jacob Fullerton

unread,
Jul 19, 2016, 4:48:31 PM7/19/16
to Tethys Platform
I'd definitely be interested in the numpy and GDAL as far as a standard. I can't think of others at the moment, but I'll keep it in mind as I code

sdc50

unread,
Jul 20, 2016, 2:52:49 PM7/20/16
to Tethys Platform
netCDF4 could be another candidate. However, I don't think we should install packages with Tethys that aren't required by Tethys directly, but it wouldn't hurt to have provide some documentation for how to install packages that would be commonly used in apps. 

@jacob, with Python packages that have underlying C libraries, like numpy, it may be necessary to install it both with apt-get (to get the C binaries) and with pip (to get the Python interface).

Another option that would likely require a lot of change would be to use conda, which handles both the binaries and Python files for packages. I don't know what the implications of that would be, so I can't say whether or not I support that yet.

swainn

unread,
Jul 20, 2016, 4:33:55 PM7/20/16
to Tethys Platform
I'm fine including additional libraries other than the primary dependencies like numPy, netCDF4 and others, because it adds to the development environment that comes with Tethys. Sort of the same logic as why we include GeoServer or PostGIS. Another motivation for providing these libraries with Tethys is to normalize the versions that are used by apps. What do you do if you want to install two apps that require different versions of these libraries? Certainly this argument could apply to any app dependencies, so I don't want to take it too far, but for a few core libraries that may get wide use, I think this is OK. SQLAlchemy is not necessarily a requirement of Tethys or the apps, but we include that library and promote it's user over the Django ORM.

Scott Christensen

unread,
Jul 20, 2016, 5:11:43 PM7/20/16
to swainn, Tethys Platform
Point taken. I can see the argument for classifying numpy etc. the same way as alchemy (i.e. as a resource for app developers). Adding these libraries to Tethys would only require updating the requirements file and the installation instructions, so it wouldn't be too hard to do.

The point about having conflicting dependencies for apps is something I've been thinking about. For another project I've been working on we are using an RPC server to isolate two Python environments that need to work together. I've wondered it we might do the same type of thing to isolate app environments. I'll have to look into it more and then I'll post a proposal if I come up with something that I think could work.

On Wed, Jul 20, 2016 at 3:33 PM swainn <nathan....@gmail.com> wrote:
I'm fine including additional libraries other than the primary dependencies like numPy, netCDF4 and others, because it adds to the development environment that comes with Tethys. Sort of the same logic as why we include GeoServer or PostGIS. Another motivation for providing these libraries with Tethys is to normalize the versions that are used by apps. What do you do if you want to install two apps that require different versions of these libraries? Certainly this argument could apply to any app dependencies, so I don't want to take it too far, but for a few core libraries that may get wide use, I think this is OK. SQLAlchemy is not necessarily a requirement of Tethys or the apps, but we include that library and promote it's user over the Django ORM.

--
You received this message because you are subscribed to a topic in the Google Groups "Tethys Platform" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tethysplatform/erUesn46Spg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tethysplatfor...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tethysplatform/b39e5fe5-d79f-4cc4-8edd-fe7e0b218daf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Scott D. Christensen, E.I.T
Research Assistant 
Brigham Young University

swainn

unread,
Jul 21, 2016, 4:33:13 PM7/21/16
to Tethys Platform, nathan....@gmail.com
Another valuable library to include would be the HydroShare rest API hs_restclient.

alansnow21

unread,
Jul 21, 2016, 4:44:46 PM7/21/16
to Tethys Platform
Be careful which packages you make a standard. 

If the dependencies get too complex within the Tethys Platform package, you could frustrate users that don't need these pieces as they will have a harder time getting Tethys Platform installed.

On the other hand, once they have them installed they have a whole host of wonderful things they can do.

Decisions decisions ...

Solution - up-to-date and user friendly documentation!
Problem - keeping up with all of the packages.

Scott Christensen

unread,
Jul 21, 2016, 5:19:56 PM7/21/16
to alansnow21, Tethys Platform
Are there still plans for integrating the HydroShare rest client into tethys_dataset_services?

--
You received this message because you are subscribed to a topic in the Google Groups "Tethys Platform" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tethysplatform/erUesn46Spg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tethysplatfor...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

swainn

unread,
Jul 22, 2016, 12:38:03 PM7/22/16
to Tethys Platform, alans...@gmail.com
There were certainly plans... Seems to me that hydroshare is getting by just fine without direct integration.
Reply all
Reply to author
Forward
0 new messages