Solution for oserror: [errno 1] operation not permitted encountered when installing tensorflow

Knowledge map advanced must read: read how large-scale map data efficient storage and retrieval>>>

Installing collected packages: numpy, scipy, six, pyyaml, Keras, opencv-python, h5py, html5lib, bleach, futures, wheel, werkzeug, markdown, protobuf, tensorflow-tensorboard, pbr, funcsigs, mock, backports.weakref, tensorflow
  Found existing installation: numpy 1.14.1
    Uninstalling numpy-1.14.1:
      Successfully uninstalled numpy-1.14.1
  Found existing installation: scipy 0.13.0b1
    DEPRECATION: Uninstalling a distutils installed project (scipy) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling scipy-0.13.0b1:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip/", line 215, in main
    status =, args)
  File "/Library/Python/2.7/site-packages/pip/commands/", line 342, in run
  File "/Library/Python/2.7/site-packages/pip/req/", line 778, in install
  File "/Library/Python/2.7/site-packages/pip/req/", line 754, in uninstall
  File "/Library/Python/2.7/site-packages/pip/req/", line 115, in remove
    renames(path, new_path)
  File "/Library/Python/2.7/site-packages/pip/utils/", line 267, in renames
    shutil.move(old, new)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 302, in move
    copy2(src, real_dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 131, in copy2
    copystat(src, dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 103, in copystat
    os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/tmp/pip-k6sIvY-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/scipy-0.13.0b1-py2.7.egg-info'


First of all, I think of the problem of directory permissions, so I don’t know how many times’ Chmod 755 ‘has been implemented, and it doesn’t work

Is that because there is something wrong with the ownership of the directory?It’s a new way to modify the “chown usename” and it’s still useless

Finally, we had to Google and found this article: Yes, he solved my problem. He just needs a little upgrade to the old package. Here is a record of the executed commands as follows:

$ pip install --upgrade pip

$ sudo pip install numpy --upgrade --ignore-installed
$ sudo pip install scipy --upgrade --ignore-installed
$ sudo pip install scikit-learn --upgrade --ignore-installed


Similar Posts: