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

Install cryptography python module in Python notebook on Bluemix


As suggested here I am trying

  !sudo apt-get install build-essential libssl-dev libffi-dev python-dev
  !sudo yum install gcc libffi-devel python-devel openssl-devel
  !pip install cryptography

which does not work, because I am not allowed to run commands as root.


Solution

  • Run !pip install --user cryptography from a Python notebook.

    Explanation: It is correctly stated that one cannot become root on the system. Thus, you cannot run any of the first two commands at all. Also pip install <package> will require access on the system that you do not have. You can tell pip to install things in the user context by providing the --user option. As for the first two commands, you don't need (one of) them, they are already satisfied; the libs are already installed system-wide.