nasa / RHEAS

Regional Hydrologic Extremes Assessment System
MIT License
73 stars 54 forks source link

Mac OSX installation issue #45

Closed vks01 closed 5 years ago

vks01 commented 8 years ago

I was trying to install RHEAS on a Mac OSX 10.9.5 and received the following error..Can you please look into this?

------ERROR START------

configure: error: could not find geos-config within the current path. You may need to try re-running configure with a --with-geosconfig parameter. postgis: cmmi failed: /var/folders/5x/8f6hyr9j0gl83w1l5x2171p00000gn/T/tmp_l071ck5buildout-postgis While: Installing postgis.

An internal error occurred due to a bug in either zc.buildout or in a recipe being used: Traceback (most recent call last): File "/Users/karthiksrinivasan/RHEAS/eggs/zc.buildout-2.5.1-py3.4.egg/zc/buildout/buildout.py", line 1992, in main getattr(buildout, command)(args) File "/Users/karthiksrinivasan/RHEAS/eggs/zc.buildout-2.5.1-py3.4.egg/zc/buildout/buildout.py", line 666, in install installed_files = self[part]._call(recipe.install) File "/Users/karthiksrinivasan/RHEAS/eggs/zc.buildout-2.5.1-py3.4.egg/zc/buildout/buildout.py", line 1407, in _call return f() File "/Users/karthiksrinivasan/RHEAS/eggs/zc.recipe.cmmi-1.3.6-py3.4.egg/zc/recipe/cmmi/init.py", line 113, in install self.build() File "/Users/karthiksrinivasan/RHEAS/eggs/zc.recipe.cmmi-1.3.6-py3.4.egg/zc/recipe/cmmi/init.py", line 196, in build self.cmmi(dest) File "/Users/karthiksrinivasan/RHEAS/eggs/zc.recipe.cmmi-1.3.6-py3.4.egg/zc/recipe/cmmi/init.py", line 221, in cmmi system("%s %s" % (self.configure_cmd, options)) File "/Users/karthiksrinivasan/RHEAS/eggs/zc.recipe.cmmi-1.3.6-py3.4.egg/zc/recipe/cmmi/init.py", line 34, in system raise SystemError("Failed", c) SystemError: ('Failed', './configure --prefix="/Users/karthiksrinivasan/RHEAS/parts/postgis" --with-pgconfig=/Users/karthiksrinivasan/RHEAS/bin/pg_config')

-----ERROR END----------

kandread commented 8 years ago

From what I can tell, you probably need to install GEOS. Let me know if it works, and I'll add it as an explicit dependency (on Linux it's installed automatically with GDAL).

vks01 commented 8 years ago

I tried installing GEOS manually, but that kept popping up some errors (did not make note of the error). I found some forums where people had posted similar issues installing GEOS with OS X 10.9.5, so I updated my machine to El Capitan (10.11.5). After I manually installed GEOS, I was able to run through the setup.

I noticed there was an update to the Git repository, so I tried installing the new version. I go through the install, but when I run ./bin/test, I get the following error (and I get this error on my Mac as well as my linux box)...

----ERROR----

ERROR: Failure: ImportError (No module named psycopg2)

Traceback (most recent call last): File "/Users/karthiksrinivasan/RHEAS/eggs/nose-1.3.7-py2.7.egg/nose/loader.py", line 418, in loadTestsFromName addr.filename, addr.module) File "/Users/karthiksrinivasan/RHEAS/eggs/nose-1.3.7-py2.7.egg/nose/importer.py", line 47, in importFromPath return self.importFromDir(dir_path, fqname) File "/Users/karthiksrinivasan/RHEAS/eggs/nose-1.3.7-py2.7.egg/nose/importer.py", line 94, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "/Users/karthiksrinivasan/RHEAS/src/datasets/init.py", line 13, in import dbio File "/Users/karthiksrinivasan/RHEAS/src/dbio.py", line 15, in import psycopg2 as pg ImportError: No module named psycopg2

ERROR: Failure: ImportError (No module named psycopg2)

Traceback (most recent call last): File "/Users/karthiksrinivasan/RHEAS/eggs/nose-1.3.7-py2.7.egg/nose/loader.py", line 418, in loadTestsFromName addr.filename, addr.module) File "/Users/karthiksrinivasan/RHEAS/eggs/nose-1.3.7-py2.7.egg/nose/importer.py", line 47, in importFromPath return self.importFromDir(dir_path, fqname) File "/Users/karthiksrinivasan/RHEAS/eggs/nose-1.3.7-py2.7.egg/nose/importer.py", line 94, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "/Users/karthiksrinivasan/RHEAS/src/vic/init.py", line 11, in from vic import VIC File "/Users/karthiksrinivasan/RHEAS/src/vic/vic.py", line 23, in import drought File "/Users/karthiksrinivasan/RHEAS/src/drought.py", line 15, in import dbio File "/Users/karthiksrinivasan/RHEAS/src/dbio.py", line 15, in import psycopg2 as pg ImportError: No module named psycopg2

ERROR: Failure: ImportError (No module named psycopg2)

Traceback (most recent call last): File "/Users/karthiksrinivasan/RHEAS/eggs/nose-1.3.7-py2.7.egg/nose/loader.py", line 418, in loadTestsFromName addr.filename, addr.module) File "/Users/karthiksrinivasan/RHEAS/eggs/nose-1.3.7-py2.7.egg/nose/importer.py", line 47, in importFromPath return self.importFromDir(dir_path, fqname) File "/Users/karthiksrinivasan/RHEAS/eggs/nose-1.3.7-py2.7.egg/nose/importer.py", line 94, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "/Users/karthiksrinivasan/RHEAS/src/tests/init.py", line 10, in from testdatasets import testDatasets File "/Users/karthiksrinivasan/RHEAS/src/tests/testdatasets.py", line 11, in import dbio File "/Users/karthiksrinivasan/RHEAS/src/dbio.py", line 15, in import psycopg2 as pg ImportError: No module named psycopg2


Ran 3 tests in 1.090s

FAILED (errors=3)

---ERROR END------

During the buildout process, it does install psycopg2.

kandread commented 8 years ago

Can you apply 57997f8d625d63f9390dfc505536efbd5984c531 and see if that fixes it?

vks01 commented 8 years ago

I dont get the psycopg2 errors anymore. However, the tests run through, but there are 24 errors - it runs 26 tests.

When a test tries to edit a table, it pops up an error similar to: "ERROR: role "kandread" does not exist STATEMENT: ALTER TABLE soils OWNER TO kandread; psql:/Users/karthiksrinivasan/RHEAS/data/tests/vic_soils.sql:37: ERROR: role "kandread" does not exist"

It looks like the code is looking for a 'wb_1.125_35.125' output file. But the scripts write out a 'data_1.125_35.125' file...

When I try to run a nowcast (after updating the database), I get the following error: ERROR: relation "raster_resampled" does not exist at character 15

This error pops up even though it appears as if updating the database creates the resampled entries.

kandread commented 8 years ago

The database role error doesn't have an effect on writing to the database. The part on the "wb" files is the output from the VIC model run. The "data" files are the VIC forcing files that are written. Can you redirect the output of the tests to a log file and attach here?

vks01 commented 8 years ago

Here are 2 files - testlog.txt was what was saved when I tried to redirect the terminal output to a text file. Command_output.txt was what I physically copied from the terminal window....

testlog.txt

command_output.txt

vks01 commented 8 years ago

I verified the unit tests on a fresh install on my Ubuntu box..The unit tests seem to work on Ubuntu, however the DSSAT module gives an error "forrtl: severe (64): input conversion error, unit -5, file Internal Formatted Read". This is the same error that I see when I try to run a nowcast (one of the other open tickets).

Unit tests still dont work on Mac.

nndas commented 5 years ago

Resolved.