Forums

Unable to install using easy-install or pip install..

I want to use the library "scikit-learn", but I am unable to install it using easy_install or pip install. While installing I am getting a lot of errors & it gets aborted. I am pasting a small portion of the error below. It would be of great help if anyone can help me resolving this soon. Thanks.

. . Could not locate executable g77 Could not locate executable f77
Could not locate executable ifort
Could not locate executable ifc
Could not locate executable lf95
Could not locate executable pgf90
Could not locate executable pgf77
Could not locate executable f90
Could not locate executable f95
Could not locate executable fort
Could not locate executable efort
Could not locate executable efc
Could not locate executable gfortran
Could not locate executable g95
Could not locate executable pathf95
don't know how to compile Fortran code on platform 'posix'
compiling '_configtest.c':

/ This file is generated from numpy/distutils/system_info.py /
void ATL_buildinfo(void);
int main(void) {
ATL_buildinfo();
return 0;
}
sh: gcc: not found
sh: gcc: not found . . . warning: no files found matching 'test.py'
warning: no files found matching '*.TXT' under directory 'sklearn/datasets'
sh: g++: not found
sh: g++: not found
error: Setup script exited with error: Command "g++ -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -fPIC -I/usr/local/li b/python2.6/dist-packages/numpy-1.6.1-py2.6-linux-x86_64.egg/numpy/core/include -c sklearn/svm/src/libsvm/libsvm_template.cpp -o buil d/temp.linux-x86_64-2.6/sklearn/svm/src/libsvm/libsvm_template.o" failed with exit status 127
/usr/local/lib/python2.6/dist-packages/numpy-1.6.1-py2.6-linux-x86_64.egg/numpy/distutils/misc_util.py:252: RuntimeWarning: Parent mo dule 'numpy.distutils' not found while handling absolute import
from numpy.distutils import log

scikits.learn is already installed, it's part of our "batteries included"

just

import scikits.learn

You need to look into this please.

I cannot make the code work even with your suggestion

from scikits.learn.model_selection import train_test_split

throws an error and so is from sklearn.model_selection import train_test_split

Help needed, i have already wasted a day on it.

Ah, it looks like the specific feature you're trying to use was moved into the model_selection package in 1.18, and we have 1.17.1 installed. Additionally, Harry gave the wrong module name in his post above.

Try using this:

from sklearn.cross_validation import train_test_split

from sklearn.cross_validation import KFold getting error on the above line Error running WSGI application ImportError: No module named learn.model_selection

Help. urgent.

does this help? http://help.pythonanywhere.com/pages/DebuggingImportError