Machine learning-graphlab Create installation and debugging

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 powerful help, thanks to the great Internet, thank you happy to share netizens. I also tidy up the installation process and debugging process, in order to help more people.

Here to make a simple note, Graphlab create currently only support Python2, and I just found the rely on Anaconda installation and debugging methods, if only the use of 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 in anaconda2-4.0.0-windows-x86_64 before, I am afraid to need to reinstall.

Already installed anaconda2-4.0.0-windows-x86_64, you can go directly to Turi website application, the following methods:



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 email address here/your product keyhere/graphlab-create-license.tar.gz

Of course, when you go into the Turi website, you will find that you have provided a very detailed installation instructions for your application. And this article directly skip the way is not quite 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.

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

The way to the right, 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, You need to use the directory of the relevant procedures, which is why I skipped the official website in the middle step, directly stitching the PIP command installation reasons.


2, if you have not installed Anaconda, two suggestions: (1) directly installed the official website to give the way, optional one installation (2) First download anaconda2-4.0.0-windows-x86_64, download the address, in the official website there. Follow the diagram below and install it in the way described in this article.



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


Here is the debugging section

3, installation is not directly used, whether in the Jupyter-notebook or Python directly using the import Graphlab, will report the following error, and the error prompted also explained the reason for the error:


Among them, told us the solution, this question Netizen has given the very good help, please refer to his Bowen: http://blog.csdn.net/u013569000/article/details/53886656

I also put the main part of it and I encountered errors recorded, easy to see.

(1) Follow the prompts to run the following code

Graphlab.get_dependencies ()

The process will continue to be terminated, as mentioned in the above blog, due to the network cause of the download failure, open get_dependencies () source code (source location in the error message will tell you), you can see we run graphlab.get_dependencies () The previous error code, in fact, is that the file is printed. 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 these two URLs to download the two files, (the fact that the download process is very easy to be interrupted) and then in the dependencies.py to comment out 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) The need for special attention is that Python statements are very sensitive to indentation, the TAB key and space is also very sensitive, if you accidentally write a blank tab, the operation will be an error: indentationerror:unexpected indent, Of course, the error message will also write clearly which line which place the error, adjust the good.

(4) In this process, no matter how many modifications dependencies.py, after each modification needs 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 my understanding and problems encountered, language organizations may not be the reader seems to be very clear, where do not understand even the error 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.