Search code examples
pythonscikit-learncloud9-idecloud9

Installing scikit learn python package for Cloud9


Just wanted to learn more about the scikit-learn package for Python, whilst learning about ML in an online course I'm doing. I'm currently using the Cloud9 online ide as I'm using a chromebook.

However, when I try to install the scikit-learn package for my ide, the access is always denied. I tried the following piece of code ...

pip install -U scikit-learn

And, I got this response ..

running install_lib

creating /usr/local/lib/python2.7/dist-packages/sklearn

error: could not create '/usr/local/lib/python2.7/dist-packages/sklearn': Permission denied

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools,     tokenize;__file__='/tmp/pip_build_ubuntu/scikit-   learn/setup.py';exec(compile(getattr(tokenize, 'open', open)   (__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-Oo3fnX-record/install-record.txt --single-version-externally-managed   --compile failed with error code 1 in /tmp/pip_build_ubuntu/scikit-learn

Does anyone have any experience in installing the sklearn package for the Cloud9 IDE? It's mentioned using the pythonpath and this is what it currently contains ...

/usr/local/lib/python2.7/dist-packages:/usr/local/lib/python3.4/dist-packages:/usr/local/lib/python3.5/dist-packages

If anyone has any clues / tutorials I can follow to get this installed, I would really appreciate the help!


Solution

  • The problem is not related to scikit-learn or python. you need to use sudo before your pip command, like so:

    sudo pip install -U scikit-learn