I am using python 3.6 and I have MAC OS X 10.12.6. I want to install packages like selenium and django. When I type pip install selenium it gives me this error
OSError: [Errno 1] Operation not permitted: '/System/Library/Frameworks/Python.framework/Versions/2.7/selenium'
Does anyone know why this is happening? I am in the same directory as pip is installed.
This error shows when you are trying to overwrite macOS inbuilt Python packages, which is protected by macOS's System Integrity Protection (SIP).
Since you are using Python 3 (which should be installed manually by you.), you should use pip3
, like so:
pip3 install selenium
Seems as though the user you're using doesn't have permissions to write to that directory. Instead of installing it system-wide, you could install the package for your own user:
$ pip install --user selenium
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.