I'm trying to install auto-sklearn using pip install auto-sklearn
, but it raises the error:
Command "/usr/bin/python3.5 -u -c "
import setuptools, tokenize;
__file__='/tmp/pip-build-tl8y2tfg/psutil/setup.py';
f=getattr(tokenize, 'open', open)(__file__);
code=f.read().replace('\r\n', '\n');
f.close();
exec(compile(code, __file__, 'exec'))
"install
--record /tmp/pip-7t8rbku0-record/install-record.txt
--single-version-externally-managed --compile"
failed with error code 1 in /tmp/pip-build-tl8y2tfg/psutil/
There is nothing starting with "pip-" in my /tmp/
directory.
I made all steps exactly as in manual, but still have this error.
I also tried to use commands from this question, but got the same error in both cases.
My OS is Ubuntu 16.04.2.
How can I install auto-sklearn?
Auto-Sklearn is an open-source library for performing AutoML in Python. It makes use of the popular Scikit-Learn machine learning library for data transforms and machine learning algorithms and uses a Bayesian Optimization search procedure to efficiently discover a top-performing model pipeline for a given dataset.
auto-sklearn
installation requires python 3.5 or higher. In addition, it also has dependencies on the packages mentioned here: https://raw.githubusercontent.com/automl/auto-sklearn/master/requirements.txt
As per the error, you seem to have an issue at psutil
installation.
A better approach is to have a python 3.5+ environment. And then using pip install auto-sklearn
.
which python
, which pip
python3 -m pip install --user virtualenv
source env/bin/activate
pip install auto-sklearn
Update:
In case you are using anaconda, following command will start your virtual env:
conda update conda
#Update your current version of conda
conda create --name py35 python=3.5
#creat e a virtual env for python 3.5
source activate py35
#activate the environment
Post your query here, again in case you are not sure of the steps.
For anyone coming to this question, I encountered this issue trying to install on OSX. The author may have left off some of her stack trace. Namely:
Installing collected packages: pyrfr
Running setup.py install for pyrfr ... error
Complete output from command /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/g5/vdl1tlwd333d5vzfw4qfc86c0000gp/T/pip-install-zy5yrmfh/pyrfr/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/g5/vdl1tlwd333d5vzfw4qfc86c0000gp/T/pip-record-iuj3muyd/install-record.txt --single-version-externally-managed --compile --user --prefix=:
running install
running build_ext
building 'pyrfr._regression' extension
swigging pyrfr/regression.i to pyrfr/regression_wrap.cpp
swig -python -c++ -modern -features nondynamic -I./include -o pyrfr/regression_wrap.cpp pyrfr/regression.i
unable to execute 'swig': No such file or directory
error: command 'swig' failed with exit status 1
Your installation errors are likely caused by not having swig installed.
Swig is a C / C ++ code generator, an interface for python to use C libraries.
You can install it by following the instructions at their project website here: http://www.swig.org/Doc4.0/SWIGDocumentation.pdf
Basically, download the most recent tarball archive from the website. Extract it. cd to the extracted folder and run:
./configure
make
make install
curl https://raw.githubusercontent.com/automl/auto-sklearn/master/requirements.txt | xargs -n 1 -L 1 pip3 install
And you should be good to run auto-sklearn.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With