0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Python 2.7.6でsetuptoolsをインストール出来ない

Posted at

setuptoolsはez_setup.pyでインストールできるわけですが,実際にpython ez_setup.pyでインストールしてみたところ,UnicodeDecodeErrorで落ちてしまうみたいです.Python2.7.6だとsetuptools使えないつらいって状況だと嬉しくありません.大変困ります.本当にPython面倒くさい.

どうやらmimetypes.pyでレジストリを読みに行ってるらしいのですが,非英語圏だと母国語のレジストリが含まれていて,それが原因で落ちてしまうみたいです.対処方法と言えば,Python本体のmimetypes.pyを書き換えるしかありません.しょうがないので,UnicodeDecodeErrorが発生する箇所の例外を握りつぶして対処しました.面倒くさい!

その時のソースコードそのまんま配布しますので,Python27/Lib/mimetypes.pyに以下のソースコードをそのまんま上書きしてください.これでインストールできるようになります.後の影響なんて知りません.

mimetypes.py

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?