[PYTHON] I got stuck trying to install various things with Mac El captain pip, so make a note

El capitan's python directory is / usr / bin, so let's go !! (Higanjima)

When I tried to install with pip such as Jupyter and Tensorflow after changing the OS of Mac to El captain, I got many errors that I had never seen.

% pip install https://storage.googleapis.com/tensorflow/mac/tensorflow-0.5.0-py2-none-any.whl                                    
Collecting tensorflow==0.5.0 from https://storage.googleapis.com/tensorflow/mac/tensorflow-0.5.0-py2-none-any.whl
  Using cached https://storage.googleapis.com/tensorflow/mac/tensorflow-0.5.0-py2-none-any.whl
Collecting six>=1.10.0 (from tensorflow==0.5.0)
  Using cached six-1.10.0-py2.py3-none-any.whl
Collecting numpy>=1.9.2 (from tensorflow==0.5.0)
  Using cached numpy-1.10.1-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Installing collected packages: six, numpy, tensorflow
  Found existing installation: six 1.4.1
    DEPRECATION: Uninstalling a distutils installed project (six) 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 six-1.4.1:
Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/basecommand.py", line 211, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/commands/install.py", line 311, in run
    root=options.root_path,
  File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_set.py", line 640, in install
    requirement.uninstall(auto_confirm=True)
  File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_install.py", line 716, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_uninstall.py", line 125, in remove
    renames(path, new_path)
  File "/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/utils/__init__.py", line 315, in renames
    shutil.move(old, new)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
    copy2(src, real_dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
    copystat(src, dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
    os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/var/folders/98/f5yhj5k51r18qfgxm8xx83v40000gn/T/pip-s4Fqnv-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'

When I tried which python, the python attached to the OS was directly under / usr / bin /, and this seems to be the cause. After reinstalling python with brew, python fits in / usr / local / bin and all subsequent installations worked.

brew update
brew install python
which python
/usr/local/bin/python

Later talk

After that, when I tried to insert ggplot2 and rjags in R, I got the following error.

Warning message: 
 doTryCatch(return(expr), name, parentenv, handler)so: 
Shared library'/Library/Frameworks/R.framework/Resources/modules//R_X11.so'Cannot be read: 
  dlopen(/Library/Frameworks/R.framework/Resources/modules//R_X11.so, 6): Library not loaded: /opt/X11/lib/libSM.6.dylib
  Referenced from: /Library/Frameworks/R.framework/Resources/modules//R_X11.so
  Reason: image not found 
  :
 Reason: no suitable image found.  Did find:
	/opt/X11/lib/libSM.6.dylib: stat() failed with errno=62 

http://stackoverflow.com/questions/26489928/cant-load-x11-in-r-after-os-x-yosemite-upgrade

I have done the following with reference to here.

sudo ln -s /usr/X11 /opt/X11 
locate libSM.6.dylib

Recommended Posts

I got stuck trying to install various things with Mac El captain pip, so make a note
I was addicted to trying Cython with PyCharm, so make a note
I failed to install django with pip, so a reminder of the solution
I got stuck when trying to specify a relative path with relative_to () in python
I got an error when pip install pandas on Mac, so I dealt with it
[Python] I tried to implement stable sorting, so make a note
I get an error when trying to install maec 4.0.1.0 with pip
I want to pip install with PythonAnywhere
I got an SSL related error with pip install, so I solved it
I tried to make a calculator with Tkinter so I will write it
I want to make a game with Python
I set up TensowFlow and was addicted to it, so make a note
[Mac] I want to make a simple HTTP server that runs CGI with Python
I stumbled upon using MoviePy, so make a note
I got an error when pip install tweepy on macOS Sierra, so I dealt with it
I tried to make various "dummy data" with Python faker
I want to make a click macro with pyautogui (desire)
Steps to install a Git cloned package locally with pip
I want to make a click macro with pyautogui (outlook)
I want to install a package from requirements.txt with poetry
I stumbled when I tried to install Basemap, so a memorandum
I tried to find out the difference between A + = B and A = A + B in Python, so make a note
[3rd] I tried to make a certain authenticator-like tool with python
What to do if you get a UnicodeDecodeError with pip install
I tried to make a periodical process with Selenium and Python
A note I was addicted to when creating a table with SQLAlchemy
I tried to make a 2channel post notification application with Python
[Introduction] I want to make a Mastodon Bot with Python! 【Beginners】
I tried to make a todo application using bottle with python
[4th] I tried to make a certain authenticator-like tool with python
Postgres environment construction with Docker I struggled a little, so note
[1st] I tried to make a certain authenticator-like tool with python
I tried to make a strange quote for Jojo with LSTM
I tried to make a mechanism of exclusive control with Go
[Fabric] I was addicted to using boolean as an argument, so make a note of the countermeasures.
I got stuck so I reviewed it
How to install mysql-connector with pip3
Python: I tried to make a flat / flat_map just right with a generator
PyPi debut I tried to pip install a library to check Japanese holidays
I got an error when trying to install Xgboost and its solution
A story I was addicted to trying to install LightFM on Amazon Linux
I came up with a way to make a 3D model from a photo.
A story I was addicted to trying to get a video url with tweepy
I tried to make "Sakurai-san" a LINE BOT with API Gateway + Lambda
I tried to make a traffic light-like with Raspberry Pi 4 (Python edition)
I get a UnicodeDecodeError when trying to connect to oracle with python sqlalchemy
[Streamlit] I hate JavaScript, so I make a web application only with Python
A reminder of what I got stuck when starting Atcoder with python
I got stuck in a flask application redirect with a reverse proxy in between
I tried to build a Mac Python development environment with pythonz + direnv
A note I looked up to make a command line tool in Python
I tried to make a url shortening service serverless with AWS CDK
Looking back on 2019 ~ One year since I started posting to Qiita ~ + Where I got stuck with python pip related
Work memorandum (pymongo) Part 3. I don't want to look it up again, so make a note of it (aggregate)