Machine learning-graphlab Create installation and commissioning

Source: Internet
Author: User
Tags error code zip

In the project process, need to use the Graphlab Create, but, the simple PIP command is not installed, so query the information, get very strong help, thanks to the great Internet, thanks to the friends who are willing to share. I also tidy up the installation process and debugging process, in order to help more people.

Here is a simple explanation, Graphlab create currently only support Python2, and I just found a dependency on Anaconda installation and debugging methods, if only use Python3 friends, please ignore this article.

In addition, Graphlab create needs to go to the official website Turi (https://turi.com/) to apply for a license academic license.

1, if you have installed the Anaconda , the version before anaconda2-4.0.0-windows-x86_64, I am afraid to need to reinstall.

Have installed the anaconda2-4.0.0-windows-x86_64, you can go directly to Turi official website application, the method is as follows:



Will jump to the application page, fill in the relevant information will be sent to your mailbox serial number. Then use your mailbox and serial number stitching the following PIP command, installation can be completed:

Pip install--upgrade--no-cache-dir https://get.graphlab.com/GraphLab-Create/2.1/your registered email address here/your product keyhere/graphlab-create-license.tar.gz

Of course, when you enter the Turi official website, the application will find itself to provide a very detailed installation instructions, and this article directly skip the way is not the same, here, see you are beginners or work needs, if it is a beginner, then, you can try two ways, I have tried, both ways can be completed.

The official website gives two ways, the left is exe executable file, after the installation will have a menu, run can, but this way is not flexible, and for beginners, it is not clear how to use Graphlab in other places, I am not very recommended to use.

The right way, the use of commands, seemingly complex but simple, but its effect is Graphlab installed in the Anaconda2\envs directory, equivalent to the Envs directory installed a set of anaconda, if you want to use Graphlab, It is necessary to use the relevant program in this directory can be, this is why I skipped the official website of the intermediate steps, directly stitching the PIP command installation reasons.


2, if you have not installed Anaconda, two suggestions: (1) Direct installation of the official website to give the way, either install (2) First download anaconda2-4.0.0-windows-x86_64, download the address, on the official website. Follow the image below and install it as described in this article.



The installation is complete. Of course, the use of non-anaconda, please refer to the official website Option2.


Here is the debug section

3, installation is not directly used, whether in Jupyter-notebook or Python directly using the import Graphlab, will report the following error, while the error message also explains the cause of the error:


Among them, told us the solution, this problem netizen gave very good help, please refer to his blog: http://blog.csdn.net/u013569000/article/details/53886656

I also recorded the main part and the errors I encountered, so that we can check it for your convenience.

(1) Follow the prompts to run the following code

Graphlab.get_dependencies ()

Process will continue to be terminated, as described in the above blog, because the network caused by the download failure, open get_dependencies () of the source (source location in the error will tell you), you can see us running graphlab.get_dependencies () The previous error code, in fact, is the file printed out. Find two lines of code to download:

(Xzarchive_file, xzheaders) = Urllib.urlretrieve (' http://tukaani.org/xz/xz-5.2.1-windows.zip ', Reporthook = CBK)
(dllarchive_file, dllheaders) = Urllib.urlretrieve (' http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64- Gcc-libs-5.1.0-1-any.pkg.tar.xz ', Reporthook = CBK)

(2) Then copy the two URLs to download the two files, (it turns out that the download process is very easy to be interrupted) and then commented out in the dependencies.py of these two words are changed to:

xzarchive_file = ' File path \\xz-5.2.1-windows.zip '
dllarchive_file = ' File path \\mingw-w64-x86_64-gcc-libs-5.1.0-1-any.pkg.tar.xz '

(3) It is important to note that the Python statement is very sensitive to indentation, the TAB key and the space is also very sensitive, if the space is accidentally written tab, the operation will be error: indentationerror:unexpected indent, Of course, the error message will also be written clearly in which line which place the error, adjust just fine.

(4) In this process, no matter how many changes have been made dependencies.py, after each modification will need to restart Python.exe or Jupter-notebook, otherwise the change will not be reloaded and compiled.

The entire installation and commissioning process is complete. Limited to the problems I understand and encounter, language organizations may not seem to readers are clear, where not understand even the wrong part of the text, welcome to correct the reader.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.