2017-04-02 14 views
0

ffmpeg-normalizeをPython 3.6.1にインストールしようとしています。これはPython 2.7.13では問題なく動作していましたが、最新のバージョンでは動作しませんでした。 I型昇格したコマンドプロンプトでffmpeg-normalize pip install failing

pip install ffmpeg-normalize

私はいくつかの理由でCommand "python setup.py egg_info" failed with error code 1を取得し続け、私はこれが何を意味するのかわからない...

C:\Users\Arete>python --version 
Python 3.6.1 

C:\Users\Arete>pip install ffmpeg-normalize 
Collecting ffmpeg-normalize 
    Using cached ffmpeg-normalize-0.4.3.tar.gz 
    Complete output from command python setup.py egg_info: 
    Traceback (most recent call last): 
     File "<string>", line 1, in <module> 
     File "C:\Users\Arete\AppData\Local\Temp\pip-build-rcxpzvv4\ffmpeg-normalize\setup.py", line 7, in <module> 
     readme = readme_file.read() 
     File "c:\program files\python36\lib\encodings\cp1252.py", line 23, in decode 
     return codecs.charmap_decode(input,self.errors,decoding_table)[0] 
    UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 2117: character maps to <undefined> 

    ---------------------------------------- 
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Arete\AppData\Local\Temp\pip-build-rcxpzvv4\ffmpeg-normalize\ 

C:\Users\Arete> 

私は、Windows 10を使用していますが、私はすでにaccepted answer on a very similar questionを幸運にすることなく試しました...

ここで問題が発生していますが、どうすればffmpeg-normalizeをインストールできますか?

答えて

2

これは私にsetup.pyのバグのようです。テキストモードでファイルを開くときにpython 3で使用されるデフォルトのエンコーディングはプラットフォームに依存するので、エンコーディングを明示的に指定する必要があります。それ以外の場合、read操作の結果は予測できなくなり、ケースで発生したように、デフォルトのエンコーディングがファイルの内容を処理できないと失敗します。

あなたがソースコードをチェックアウトし、この行を変更することにより、それを修正することができるはずです。

with open('README.rst') as readme_file: 

をコマンド・プロンプトを開いてインストールするにはUTF-8

with open('README.rst', encoding='utf8') as readme_file: 

を使用するように、cdへディレクトリにはsetup.pyが含まれており、次に:

pip install .