Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in running python bootstrap.py #139

Open
marcosrbenso opened this issue Dec 7, 2022 · 5 comments
Open

Error in running python bootstrap.py #139

marcosrbenso opened this issue Dec 7, 2022 · 5 comments

Comments

@marcosrbenso
Copy link

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 pypa/setuptools#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
Copy link

akssinghe commented Dec 8, 2022

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
Copy link
Author

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
Copy link

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 pypa/setuptools#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
Copy link

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants