Search code examples
apache-sparkibm-cloudnltkjupyterdata-science-experience

!pip install nltk -> permission denied


I'm trying to install nltk with the following notebook command:

!pip install nltk

However, that throws the following error:

error: could not create '/usr/local/src/bluemix_ipythonspark_141/notebook/lib/python2.7/site-packages/nltk': 
Permission denied

How can I install nltk from the Jupyter notebook? Note that the spark environments on bluemix can only be accessed via the notebook. There isn't she'll access to the environment.


Solution

  • As the question is about IPython notebooks on Bluemix, the following suffices:

    !pip install --user nltk
    

    There is no need for manipulating sys.path.