scikit-learn-contrib / lightning

Large-scale linear classification, regression and ranking in Python
https://contrib.scikit-learn.org/lightning/
1.73k stars 214 forks source link

PIP Installation #8

Closed chrisspen closed 10 years ago

chrisspen commented 11 years ago

Can this be installed using pip in a virtualenv? I have scikits-learn and cython successfully installed this way, but when I try to install lightning via:

pip install https://github.com/mblondel/lightning/archive/master.zip

I get the error:

g++: error: dataset_fast.cpp: No such file or directory

g++: fatal error: no input files

compilation terminated.

g++: error: dataset_fast.cpp: No such file or directory

g++: fatal error: no input files

compilation terminated.

error: Command "g++ -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -fPIC -I/tmp/myproject/.env/local/lib/python2.7/site-packages/numpy/core/include -I/tmp/pip-lqLKbu-build/lightning/random -I/tmp/myproject/.env/local/lib/python2.7/site-packages/numpy/core/include -I/usr/include/python2.7 -c dataset_fast.cpp -o build/temp.linux-x86_64-2.7/dataset_fast.o" failed with exit status 4
mblondel commented 11 years ago

Thanks for the bug report!

Currently, I assume that the cpp files have already been compiled by make cython prior to calling python setup.py install (see README.rst). I'll try to see if I can get setup.py to automatically call Cython. In the meantime, I recommend manual install.

mblondel commented 10 years ago

@chrisspen Sorry for the long delay but I think this issue should now be solved (I added the generated Cython files directly to the repository). Could you check that pip install https://github.com/mblondel/lightning/archive/master.zip now works? Thanks!

qymwill commented 10 years ago

Hi, when I was installing your software "lightning", I met some problems (I am working on Win7 64-bit system). I have installed Python 3.3, and related packages including setuptools, Numpy, SciPy, scikit-learn, which are downloaded from http://www.lfd.uci.edu/~gohlke/pythonlibs/ with Win32 version. After that, I use pip to install lightning with the command "pip install https://github.com/mblondel/lightning/archive/master.zip". However, I always get such errors:

Command "D:\Program Files (x86)\Python\python.exe" -c "import setuptools, tokeni ze;file='c:\users\yiming\appdata\local\temp\pip-t56mom-build\setup.py ';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record c:\users\yiming\appdata\local\temp\p ip-s3rie3-record\install-record.txt --single-version-externally-managed --compil e failed with error code 1 in c:\users\yiming\appdata\local\temp\pip-t56mom-build Storing debug log for failure in C:\Users\Yiming\pip\pip.log

In addition, I install Visual Studio 2008, 2010, and 2012 in my machine. Do you have any instructions/steps about how to install "lightning" on Windows? Thanks.

mblondel commented 10 years ago

It might be a Python 3 specific issue. Could you try with Python 2.7?

mblondel commented 10 years ago

I confirmed that pip now works fine on Python 2.7. Python 3 support is another issue so closing.