From Sklearn import datasets importerror:cannot Import name DataSet toss process Memorial

Source: Internet
Author: User

Since the Cousera elective Michegan University's 0 basic introductory Python, the programmer's life is boundless longing. Before the course teacher on their own website to complete the homework submission, their computer is not how to use, recently installed a python2.7 and a series of packages. I have to say that my series of yy,python have been totally ungrateful. All the way to learn pygame and then wrote a text of their own based Game,high do not want to.

At first I thought it was a setup error, so I deleted the uncompressed files that were copied in, and Sklearn the latest version of the package with the PIP command, but still not. In the meantime also encountered a problem, Pip install actually say not order, to use Pip.exe install just, also toss me for a while. Later went to Sklearn official website carefully studied the installation instructions, not fully understand but may not have installed the Windows SDK, a search, my days 1g how big, also can only try.

And then after the installation does not have any effect ...
But also did not go to unload ....

Then I was desperate, and looking for it on Google ... Found this. All I did was add the Python installation path to path, without adding a variable called Pythonpath ...

Then I did not succeed, because only in the system variables added, I was unwilling, and in the user added a .... So the miracle appeared ...
Do not understand the mechanism ... It's finally going to work anyway.

But not long, do not know what happened soon and die ... However, the toss of one night was not successful.

This anger, perhaps the magic ritual needs to strictly follow a certain order bar. Then reinstall the entire process: first install the Python 64bit MSI installation package and then the environment variable settings: add C:\Python27\Scripts\ in Path; C:\Python27\; Create a new Pythonpath variable with a value of C:\Python27\Lib\site-packages; After that, enter Python in CMD to see if the version number is present, make sure the environment variable is set correctly. Then install the installation wheel (subsequent warranty installation for WHL file support): Enter PIP install wheel in cmd and then install each package in the order NumPy scipy matplotpy scikit-learn: Pip Install Add the WHL directly in (if you have previously installed these packages you need to order Pip Uninstall,ps: I tried direct pip install NumPy, unsuccessful) complete. Open an example of a linear regression try
In addition, from Sklearn import datasets in the Py file, there will always be a problem with the title, no solution; but typing in the Python shell does not prompt an error. Anyway do not write this in the py file is good, directly with the from Sklearn.datasets import Load_iris This is good, can not solve the first evasion of the

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.