NOAA-ORR-ERD / OilLibrary

The NOAA library of oils and their properties.
Other
11 stars 17 forks source link

Problems installing NOAA #7

Closed zepgago closed 7 years ago

zepgago commented 7 years ago

Something obviously went wrong with the database. If anyone could help me I would appreciate:

image

ChrisBarker-NOAA commented 7 years ago

@JamesMakela-NOAA:

Has this been tested recently on Windows?

ChrisBarker-NOAA commented 7 years ago

This is working for us on Windows, but we may have identified the problem.

The setup.py is designed to install the oil_Library pacakge, an then build teh DB by running a script that was installed with the package.

The error you see indicates that it isn't finding that script, which means that the package install failed, or, more likely, that the Python package dir is not on your PATH.

How did you install Python? and how are you running this?

i.e. if you did a miniconda install, it will optionally add it to your PATH. If you didn't select that, then you need to run python from a "Anaconda cmd shell" (or something like that), rather than a plain cmd window shell, as a plain cmd Window will not have the PATH set correctly.

zepgago commented 7 years ago

Yes I installed miniconda 2 after installing python 2. Pasted everything that was inside the folder OilLibrary-master in the directory C:/Programs/Miniconda2. I opened the windows Command Prompt, changed the directory to C:/Programs/Miniconda2 and then ran the following: python setup.py install

I'm trying to install the Oil Library in order to run the Opendrift software.

Sorry if I'm not able to do something easy, but I'm not an expert in programing and never tried python before.

Thank you for your cooperation @ChrisBarker-NOAA All the best

zepgago commented 7 years ago

If I run the same command in the Anaconda Prompt I get the following: image

ChrisBarker-NOAA commented 7 years ago

Ah:

"Yes I installed miniconda 2 after installing python 2."

miniconda 2 provides python itself. So you want to either use python installed separately or use miniconda, but not both.

If you want to use it with OpenDrift, you should install it and its dependencies the same way are doing OpenDrift.

Your current error is a dependency problem. you need to do one of:

for conda:

conda config --add channels conda-forge conda install --file conda_requirements.txt

for non-conda python:

pip install -r requirements.txt

Then run setup.py install.

The setup.py does expect that the Python scripts dir is on PATH. Depending on how you installed Python it may or may not be.

-CHB

zepgago commented 7 years ago

@ChrisBarker-NOAA thanks a lot for your help! All working well now!

I uninstalled both python and miniconda and installed miniconda2 again.

I still had to install some packages I had missing that I found in OilLibrary/oil_library_conda_recipe/meta.yaml

conda install --yes numpy setuptools sqlalchemy transaction zope.sqlalchemy awesome-slugify unit_conversion pytest

And after that all went smoothly!

Cheers