Build Error h20-3 No module reprlib

699 views
Skip to first unread message

Steven Waldren

unread,
May 31, 2016, 8:36:28 PM5/31/16
to H2O Open Source Scalable Machine Learning - h2ostream
Pulled head from github h20-3 today
OSX 10.11.5


During my build I get the following error. I am not real familiar with python. I have 2.7 and 3.5 install on my machine. I was able to successfully build a few weeks ago (had to migrate to a new laptop and this is my first build attempt).

Any pointers, would be helpful. In the past I was able to "pip install <modulename>" but I get a "Could not find a version that satisfies the requirement reprlib (from versions: ) No matching distribution found for reprlib"

Thanks,
Steven


#### BUILD ERROR FRAGMENT ######

:h2o-py:buildDist

Traceback (most recent call last):

  File "setup.py", line 5, in <module>

    import h2o

  File "/Users/swaldren/Documents/Development/code/gitrepo/h2o-3/h2o-py/h2o/__init__.py", line 7, in <module>

    from .h2o import *

  File "/Users/swaldren/Documents/Development/code/gitrepo/h2o-3/h2o-py/h2o/h2o.py", line 11, in <module>

    install_aliases()

  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/future/standard_library/__init__.py", line 451, in install_aliases

    __import__(newmodname)

ImportError: No module named reprlib

:h2o-py:buildDist FAILED

:h2o-py:buildDist took 0.328 secs


FAILURE: Build failed with an exception.


* What went wrong:

Execution failed for task ':h2o-py:buildDist'.

> Process 'command 'python'' finished with non-zero exit value 1

Lauren DiPerna

unread,
May 31, 2016, 10:23:59 PM5/31/16
to Steven Waldren, H2O Open Source Scalable Machine Learning - h2ostream
Hi Steve,

Can you try the process again using the guidelines here: https://github.com/h2oai/h2o-3#Building

after you run the line

# Start H2O
java -jar build/h2o.jar

run python, either from the command line or in a notebook

in python do:

import h2o
h2o.init()

and see if that works



Otherwise you don't have to build h2o yourself, you can get it prebuilt by following the download instructions for python here

cheers,

Lauren

--
You received this message because you are subscribed to the Google Groups "H2O Open Source Scalable Machine Learning - h2ostream" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h2ostream+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lauren DiPerna

unread,
Jun 1, 2016, 1:48:03 AM6/1/16
to Steven Waldren, H2O Open Source Scalable Machine Learning - h2ostream
Hi Steve,

Because you have python 2.7 and 3.5, you should check if you pip installed all the dependencies for just python 3.5 or just python 2.7

From the command line try doing the below and see what it outputs (you mentioned issues with `pip`, does this command work for you: `pip install -U pip`?)

pip show h2o (or this might be `pip2.7 show h2o` for you)

and then do:

pip3 show h2o

I would also recommend doing the same for all the dependencies to make sure you have them in both python 2.7 and 3.5, this might help you uncover which packages your missing.

for python you need:
pip install grip (see what happens if you do `pip show grip` and `pip3 show grip, repeat for the rest)
pip install tabulate
pip install wheel
pip install scikit-learn

(if you're running tests)
pip install scikit-learn pip install numpy pip install scipy pip install pandas pip install statsmodels pip install patsy pip install future

And then one more question do the following commands work successfully for you?

./gradlew syncSmalldata
./gradlew syncRPackages
It's just after you do the below that it breaks?

./gradlew clean
./gradlew build -x test

Lauren



On Tue, May 31, 2016 at 7:54 PM, Steven Waldren <swal...@gmail.com> wrote:
Thanks Lauren. I did follow the procedures (did not use home-brew but manually installed components) before migrating to the new laptop. 

Sounds like this error is not a common issue, so I will do some more digging.

I understand that I can get the prebuilt and have been using that. Just wanted to be able to build from source. For me, it helps me understand the project much better and learn.

Best,
Steven

an...@0xdata.com

unread,
Jun 1, 2016, 1:53:43 PM6/1/16
to H2O Open Source Scalable Machine Learning - h2ostream
Hi Steven,

Could you please see which python is being used when running the 'python' command from cli? Please do a 'which python' to see where it points.

The next step would be to ensure that all required modules are installed for that version of python being called by the system.

Thanks.

Lauren DiPerna

unread,
Jun 1, 2016, 2:47:26 PM6/1/16
to an...@0xdata.com, H2O Open Source Scalable Machine Learning - h2ostream
another thing to check for is if you have mactex installed.

--

Steven Waldren

unread,
Jun 3, 2016, 9:16:18 AM6/3/16
to H2O Open Source Scalable Machine Learning - h2ostream, an...@0xdata.com
I appears I was using 2.7 but with the new Mac there was no pip installed. I had installed 3.5 and had installed all the required modules with pip3.

I opened my 3.5 site-package folder and see all the required modules (except h2o).

So, I added a bash alias [ alias python=“python3” ] to try and force use of 3.5. When I run “python —version” from cli, I get 3.5.

Then I run ./gradlew build -x test   and I get the same error, which appears to be caused by python not being able to find the h2o module. 

What version of python should I be using during the h2o build?


Also mactex is not installed that I can tell.
--
You received this message because you are subscribed to a topic in the Google Groups "H2O Open Source Scalable Machine Learning - h2ostream" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/h2ostream/QU-jaqH4vF4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to h2ostream+...@googlegroups.com.

an...@0xdata.com

unread,
Jun 3, 2016, 3:07:57 PM6/3/16
to H2O Open Source Scalable Machine Learning - h2ostream, an...@0xdata.com
Hi Steven,

You should be able to use 2.7 or 3.5 python, but depending on what version your system is using that is the version that needs all modules installed to help build h2o. To invoke python 3.5 pip use pip3 or do a 'which pip' to see what version of pip is being called by default.

Steven Waldren

unread,
Jun 4, 2016, 7:36:15 AM6/4/16
to an...@0xdata.com, H2O Open Source Scalable Machine Learning - h2ostream
How is the h2o module added to python path during the h2o build process?

I have added the other modules and verified they are there. 

Best,
Steven

Sent from my iPad

Lauren DiPerna

unread,
Jun 8, 2016, 4:54:15 PM6/8/16
to Steven Waldren, Anmol Bal, H2O Open Source Scalable Machine Learning - h2ostream
Hi Steven,

you mentioned that you had all the python dependencies, but I wanted to make sure you pip installed - U (and pip3 installed - U) the dependencies listed under the required dependencies for the build, and the required dependencies for the build test.

here is the complete list that you should try reinstalling with pip2.7 and pip3

pip install -U grip
pip install -U wheel
pip install -U scikit-learn
pip install -U requests pip install -U tabulate pip install -U future pip install -U six
pip install -U numpy pip install -U scipy pip install -U pandas pip install -U statsmodels pip install -U patsy pip install -U future


--
You received this message because you are subscribed to the Google Groups "H2O Open Source Scalable Machine Learning - h2ostream" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h2ostream+...@googlegroups.com.

Steven Waldren

unread,
Jun 8, 2016, 5:14:19 PM6/8/16
to Lauren DiPerna, H2O Open Source Scalable Machine Learning - h2ostream, Anmol Bal
Thanks.

Requirement already up-to-date: Markdown>=2.5.1 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from grip)

Collecting Flask>=0.10.1 (from grip)

  Downloading Flask-0.11.1-py2.py3-none-any.whl (80kB)

    100% |████████████████████████████████| 81kB 1.9MB/s 


I ran for both pip and pip3. The above was the only thing I got expect for “Requirement already up-to-date”

For 3.5 I get the following error still

/Users/swaldren/Documents/Development/code/gitrepo/h2o-3/h2o-py/h2o/__init__.py:h2o-py:setProjectVersion took 0.011 secs

:h2o-py:buildDist

Traceback (most recent call last):

  File "setup.py", line 5, in <module>

    import h2o

  File "/Users/swaldren/Documents/Development/code/gitrepo/h2o-3/h2o-py/h2o/__init__.py", line 7, in <module>

    from .h2o import *

  File "/Users/swaldren/Documents/Development/code/gitrepo/h2o-3/h2o-py/h2o/h2o.py", line 11, in <module>

    install_aliases()

  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/future/standard_library/__init__.py", line 451, in install_aliases

    __import__(newmodname)

ImportError: No module named reprlib

:h2o-py:buildDist FAILED

:h2o-py:buildDist took 0.309 secs


FAILURE: Build failed with an exception.


* What went wrong:

Execution failed for task ':h2o-py:buildDist'.

> Process 'command 'python'' finished with non-zero exit value 1


Maybe it is not just in the cards for me to build on this new Mac.

Best,
Steven
Reply all
Reply to author
Forward
0 new messages