Well it seems like there has been some permission issue while installing the libraries.
If your os is windows then open the command prompt as administrator .
refer : https://www.howtogeek.com/194041/how-to-open-the-command-prompt-as-administrator-in-windows-8.1/
if you are on mac then try it with ‘ sudo ‘ as prefix in each command .