LoginSignup
0
1

More than 3 years have passed since last update.

Unicode Decode Eroorでpip installできないのを手動で直す

Last updated at Posted at 2020-09-27

はじめに

Windows10、Anaconda環境でpip install markovifyを実行するとこんなエラーが出た
UnicodeDecodeError: 'cp932' codec can't decode byte 0x94 in position 8016: illegal multibyte sequence

原因

WindowsがCP932(Shift_JIS)でエンコードされていないファイルをCP932に変換してるっぽい

解決策

僕の場合はmarkovifyのソースファイルを落としてsetup.pyを修正することで解決しました
具体的には、READMEの読み込みに失敗しているのが原因なので
with open(os.path.join(HERE, 'README.md')) as f:
これを
with open(os.path.join(HERE, 'README.md'),encoding='utf-8') as f:
こうして
python setup.py install
を実行して無事にインストールできました。やったね。

0
1
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
1