nasa / RHEAS

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

Error in running python bootstrap.py #139

Open marcosrbenso opened 1 year ago

marcosrbenso commented 1 year ago

Hello,

I'm installing RHEAS for the first time in my PC (Lubuntu Jammy Jellyfish) using Python 3.10.6.

After executing the command $ python3 bootstrap.py, I get the following:

ez_setup.py is deprecated and when using it setuptools will be pinned to 33.1.1 since it's the last version that supports setuptools self upgrade/installation, check https://github.com/pypa/setuptools/issues/581 for more info; use pip to install setuptools /home/marcosrb/.local/lib/python3.10/site-packages/pkg_resources/init.py:123: PkgResourcesDeprecationWarning: is an invalid version and will not be supported in a future release warnings.warn( Traceback (most recent call last): File "", line 1, in ImportError: cannot import name 'main' from 'setuptools.command.easy_install' (/home/marcosrb/.local/lib/python3.10/site-packages/setuptools/command/easy_install.py) Traceback (most recent call last): File "/home/marcosrb/RHEAS-develop/bootstrap.py", line 171, in raise Exception( Exception: Failed to execute command: '/usr/bin/python3', '-c', 'from setuptools.command.easy_install import main; main()', '-mZqNxd', '/tmp/tmp5pm_da2f', 'zc.buildout==3.0.1'

I try to update setuptools I try to install all different packages.

I found that the package urllib2 is no longer supported in Python3, so I downloaded Python2 and still I wasn't successful.

Does anyone have any tip or advice for me?

akssinghe commented 1 year ago

Hi,

Pls try to follow this installation guide with new version of RHEAS available in gitlab. https://1drv.ms/w/s!AuqzBPgEu8sXhfUp6vB1TYvZPX1zMw?e=qkxrLw

marcosrbenso commented 1 year ago

Thank you so much @akssinghe

I followed the installation guide step by step. My Python verision is Python 3.10.6.

Everything went right, except the last step when I test the installation using the command $ rheas -h I get the following message:

Traceback (most recent call last): File "/usr/lib/python3.10/runpy.py", line 187, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "/usr/lib/python3.10/runpy.py", line 146, in _get_module_details return _get_module_details(pkg_main_name, error) File "/usr/lib/python3.10/runpy.py", line 110, in _get_module_details import(pkg_name) File "/home/marcosrb/RHEAS/rheas/init.py", line 1, in from .rheas import run File "/home/marcosrb/RHEAS/rheas/rheas.py", line 15, in from . import config, datasets, dbio, forecast, nowcast File "/home/marcosrb/RHEAS/rheas/datasets/init.py", line 1, in from .datasets import (dates, download, ingest, readDatasetList, spatialSubset, File "/home/marcosrb/RHEAS/rheas/datasets/datasets.py", line 22, in from .decorators import geotiff, path File "/home/marcosrb/RHEAS/rheas/datasets/decorators.py", line 22, in from pydap.client import open_url File "/home/marcosrb/.local/lib/python3.10/site-packages/pydap/client.py", line 50, in from .model import DapType File "/home/marcosrb/.local/lib/python3.10/site-packages/pydap/model.py", line 175, in from collections import OrderedDict, Mapping ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/init.py)

I'm a bit confused, was I supposed to get this message?

ecopirate commented 1 year ago

Greetings

I also follow the installation guide with new version of RHEAS available in gitlab. https://1drv.ms/w/s!AuqzBPgEu8sXhfUp6vB1TYvZPX1zMw?e=qkxrLw on Windows WSL2 Ubuntu

Same-same issues as original poster. All good with the installation steps until last step:

python3 bootstrap.py ez_setup.py is deprecated and when using it setuptools will be pinned to 33.1.1 since it's the last version that supports setuptools self upgrade/installation, check https://github.com/pypa/setuptools/issues/581 for more info; use pip to install setuptools Downloading https://pypi.io/packages/source/s/setuptools/setuptools-33.1.1.zip Extracting in /tmp/tmp9eygysa8 Now working in /tmp/tmp9eygysa8/setuptools-33.1.1 Building a Setuptools egg in /tmp/tmp9fc1paus warning: no files found matching '*' under directory 'setuptools/_vendor' /tmp/tmp9fc1paus/setuptools-33.1.1-py3.8.egg Couldn't find index page for 'zc.buildout' (maybe misspelled?) Couldn't find index page for 'zc.buildout' (maybe misspelled?) No local packages or working download links found for zc.buildout error: Could not find suitable distribution for Requirement.parse('zc.buildout') Traceback (most recent call last): File "bootstrap.py", line 171, in raise Exception( Exception: Failed to execute command: '/usr/bin/python3', '-c', 'from setuptools.command.easy_install import main; main()', '-mZqNxd', '/tmp/tmp9fc1paus', 'zc.buildout'

How to get bootstrap.py and build Rheas??

ecopirate commented 1 year ago

Regarding the warning: no files found matching '*' under directory 'setuptools/_vendor'

setuptools version 33.1.1 doesn't have vendor folder.

https://github.com/pypa/setuptools/tree/v33.1.1/setuptools

akssinghe commented 1 year ago

Seems it might be good to downgrade python 3.10 to 3.7 or 3.8. Hope then it would work well.