How to install specific versions of H2O - python

I need to install an older version of H2O because model loading doesn't work even if the versions are just one apart (3.26.0.2 vs. 3.26.0.3). I'm struggling to find a page from which I can find the download links. Why doesn't it exist? All software have an archive or older versions page for this. I also tried playing with the link to current version but no luck as it doesn't have a pattern you could guess.
So how can I install H2O 3.26.0.2 in Python (pip)?
Looked all over the web and documentation
model = h2o.load_model("H2O.model_name.zip")
Error: Found version 3.26.0.2, but running version 3.26.0.3
Request: POST /99/Models.bin/
data: {'dir': 'H2O.model_name.zip'}```

The Changes.md file is the easiest place to look for links to where you can download every version. Just search for the version you want (e.g. "3.26.0.2") and you will see the URL there.
Click on the link and it will bring you to the download page for that version and you can click on the "Install in Python" tab which will show some code like this that you can copy/paste into your terminal:
# The following command removes the H2O module for Python.
pip uninstall h2o
# Next, use pip to install this version of the H2O Python module.
pip install http://h2o-release.s3.amazonaws.com/h2o/rel-yau/2/Python/h2o-3.26.0.2-py2.py3-none-any.whl
The URLs are "predictable" but you have to know the name of the release as well as the version number to correctly guess the URL.

If you are installing h2o via pip, go to Release History page in the PyPi page for H2O. Look for the specific version you need and install that version based on the command provided over there. It should be similar to the following command.
pip install h2o==3.26.0.2

Related

Is there any documentation about spyder reports?

I just found out about spyder-reports which can both generate the python code and the HTML output from the .mdw file. I installed it with pip, but then I didn't found any way to work with it. I am using spyder 4.1.3 with python 3.6.4, and nothing changed in the interface, opening a .mdw file doesn't seem to propose anything.. How does this plugin work?
Is there any documentation, examples, I could use to figure out how it works?
Unfortunately, no. According to their GitHub issues:
Sorry, this plugin is unmaintained now and it's not compatible with the latest release of Pweave. We'll come back to it after we release Spyder 4.
and
This plugin is unmaintained and not compatible with the latest release of Pweave. To help update it or see the status of that work, visit this link.
Your best bet at this time is to uninstall since the installation downgrades some packages:
pip uninstall spyder-reports
or
conda uninstall spyder-reports
Sources:
https://github.com/spyder-ide/spyder-reports/issues/76
https://github.com/nathancarter/spyder-reports/commit/5fcddd1503e17b5db8df6f0dbe7444f1698824a6

Where to install a new module from when the module is deprecated in Python

I'm currently working on some Python code, and when I try to run the code it spits an error message
C:\Users\marra\Anaconda3\lib\site-packages\sklearn\externals\six.py:31:
DeprecationWarning: The module is deprecated in version 0.21
and will be removed in version 0.23 since we've dropped support for Python 2.7.
Please rely on the official version of six (https://pypi.org/project/six/).
"(https://pypi.org/project/six/).", DeprecationWarning)
I understand that "deprecated" means that it contains some old version of module that is no longer updated, and what's recommended to do is to replace the old version with an updated version.
But the problem is that I don't know what to do to update it with a newer version.
Will I need to install something via Anaconda Prompt (Anaconda3) with a command like install XXXX?
Or will I need to download something on a certain website? I've already visited the website of the URL shown in the error message (https://pypi.org/project/six/) and tried downloading the files that were shown when I clicked "download file" button there, but they were some files that I couldn't open after all.
My OS is Windows 10.
Any suggestion to fix this?
Try pip install six. That should install the "official" version of six exactly as the error message suggests. Hopefully sklearn should then use that, in preference to the version of six that it bundles inside its own externals subdirectory. If sklearn fails to behave in the desired way, the next thing to try would be to ensure it is upgraded to the latest version, by saying pip install --upgrade sklearn. (You may wish to do that anyway.)

Install gdcm without conda

I want to install gdcm on linux. Based on the instructions (https://anaconda.org/clinicalgraphics/gdcm), I have to use:
conda install -c clinicalgraphics gdcm
However, I can not use conda install because I should not use Anaconda for some reasons. So, how can I install gdcm?
The problem is that you've gone to the Anaconda page for gdcm, instead of to the project's homepage. Of course the Anaconda page tells you how to install it for Anaconda. But it's got a link to the homepage right there near the top:
Home: https://sourceforge.net/p/gdcm/gdcm/
If you follow the link, the readme refers you to an INSTALL.TXT file, which starts off with:
See the wiki page at:
http://gdcm.sourceforge.net/wiki/index.php/Getting_Started
If you are reading this file, it certainly means you do not know how to build GDCM. See:
http://gdcm.sourceforge.net/wiki/index.php/Configuring_and_Building
It's pretty clear that this is a C library that has bindings for a bunch of languages, not a Python library. So, if you're not on a platform that has pre-built packages for it (it looks like that's only Debian and Ubuntu linux), you'll have to have a bunch of prereqs that you don't usually need for Python, but the directions look pretty easy to follow.
You can compile it from the scratch.
First step, you download from the website https://sourceforge.net/p/gdcm/gdcm/
Next step, it's done with CMake command
I found using pip install python-gdcm from https://pypi.org/project/python-gdcm/ as a working replacement for the conda install.

How to download previous version of Werkzeug

How do I download previous version of Werkzeug from a trusted site?
Here is what I have tried:
1) I went to this link:
http://werkzeug.pocoo.org/docs/0.9/installation/#installing-a-released-version
and clicked on the "Download Page" link.
It took me to the 0.10.4 download page.
2) I googled "Werkzeug download 0.9" and only got references to 0.10. There was a download link to a versioneye.com site that I don't know if I can trust.
I need to download the previous version because 0.10.x dropped support for support for OpenSSL.
[edit] I have to download rather than install from pip because I don't have access to pip on the old machine I am installing on. It is old, hence the complications.
[edit] I had to use the older version because 0.10.x dropped support for the OpenSSL package in favor of ssl built into Python 2.7.9. I was stuck on Python 2.7.5 so I wanted to continue to use OpenSSL package. I think they made the right decision to drop support as the majority of people can upgrade to 2.7.9.
You can install an old package with pip:
pip install Werkzeug==0.9.6
Building on f43d65's comment, I have refined it to these steps which include making sure it is coming from a reliable source:
goto the official website: http://werkzeug.pocoo.org/
click link to official github account: https://github.com/mitsuhiko/werkzeug
click on releases tab: https://github.com/mitsuhiko/werkzeug/releases
Note: the instructions make sure that the download is coming from the official source.
go in pycharm settings and then in interprator click on + there in packages and then search for werkzeug there, after click on versions and choose old version. it did work for me.

Installing shapefile / shapelib not found via conda or pip

I am trying to read shapefiles to view suburbs in a city following this tutorial using windows 8, Anaconda and iPython.
I tried "conda install shapefile" and "pip install shapefile" in command prompt, both returning "Error: No packages found matching: shapefile".
Besides that I tried adding it manually following these links [1]How to import a module given the full path?
[2]Import python module NOT on path. However I am getting permission errors which suggests I am not importing them correctly anyway.
Any suggestions on how to proceed or best practices are appreciated.
try
pip install pyshp
in your cmd.
that is the name of you library as far as I can see, see https://pypi.python.org/pypi/pyshp
conda only works for these http://docs.continuum.io/anaconda/pkgs.html packages.
For the ones not in the list you need to use pip install. It can be confusing as the name of the library on pypi (this is where pip goes to download it) is often, but not always the same as the import name, so if conda and pip don't work, first try to google to make 100% sure that your library is not on pypi, because most respectable libraries are...

Categories

Resources