Pregunta

I'm currently using scikit-learn 0.14.1, which I installed using pip. I'm running Python version 2.7.6 (64 bit), using Canopy Enthought as my IDE. My operating system is OSX 10.9.2

Currently, I am trying to install scikit-learn 0.15. I cloned the repository into my home directory, cd'ed into it, and typed 'python setup.py install' into the command line.

I got an error saying:

error: could not delete '/Users/*****/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/sklearn/__check_build/__init__.py': Permission denied

Anyone have any advice on how I should go about installing scikit-learn 0.15? Should I have cloned the directory into /Users/*****/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/ ?

Thanks so much!

¿Fue útil?

Solución

A way of installing many python packages, amongst which scikit-learn, without needing root priviledges is to install it locally

python setup.py install --user

which will write information to ~/.local.

A second option is

python setup.py develop

which will compile in place and place a symbolic link in /Users/*****/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/. You may have to sudo and you may have to delete the old sklearn.

A third, more explicit way of doing this is to place the symbolic link yourself, which will require surgical, but very localized use of sudo for placing the link and removing the old scikit learn.

Assuming you cloned into ~/scikit-learn/

cd ~/scikit-learn
make in
cd /Users/*****/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/
sudo mv sklearn sklearn_
sudo ln -s ~/scikit-learn/sklearn sklearn

More detailed information on the website about installing in general and installing the bleeding edge

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top