OS情報
sw_vers -productVersion
============================
10.12.4
============================
内容
mac os sierra で pandas を使っていたのですが、
pandas.Series.sort_values — pandas 0.20.1 documentation が使えず、
インストールしてあるpandas
のversion を確認したところ、
以下の通り、0.16.0
だったので、
pip list | grep pandas
pandas (0.16.0)
sudo pip install -U pandas
を実行したところ、以下のようなエラーが発生しました。
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
renames(path, new_path)
File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 267, in renames
shutil.move(old, new)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 299, in move
copytree(src, real_dst, symlinks=True)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 208, in copytree
raise Error, errors
Error: [('/System/Library/F....
... "[Errno 1] Operation not permitted: ...
エラーメッセージで、検索したところ、以下記事を見つけました。
- python - “OSError: [Errno 1] Operation not permitted” when installing Scrapy in OSX 10.11 (El Capitan) (System Integrity Protection) - Stack Overflow
- OS X EI Caption(10.11.1)でAWS CLIのインストールエラー - Qiita
おそらく、同様のsix
が既にインストールされていることが原因のように感じたので、
以下、コマンドを実行したところ、無事upgrade できました。
sudo pip install -U pandas --ignore-installed six
以上です。
コメント