2014-11-28 5 views
5

nicht dekodieren Ich versuche, Gensim mit Pip auf meiner virtuellen Maschine zu installieren. Allerdings erhalte ich die Fehlermeldung:Pip-Installation von Gensim - 'Ascii' Codec kann Byte 0xe2 in Position 53

Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-jM6uSL-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/scipy 
Traceback (most recent call last): 
    File "/usr/local/bin/pip", line 11, in <module> 
    sys.exit(main()) 
    File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 185, in main 
    return command.main(cmd_args) 
    File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 161, in main 
    text = '\n'.join(complete_log) 
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 53: ordinal not in range(128) 

ich für ähnliche Fragen auf SO aussehen, und fand `pip install pandas` gives UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 41: ordinal not in range(128) in der Nähe zu sein. Ich habe jedoch versucht, Pip auf die neueste Version zu aktualisieren.

Die pip Version Details

pip 1.5.6 from /usr/local/lib/python2.7/dist-packages (python 2.7) 

Irgendwelche Gedanken dazu?

Antwort

1

ich hatte das gleiche Problem, und finden eine Antwort here

nur

export LC_ALL = C

ausgewertete mein Problem

+0

Wenn Sie Ansible verwenden, um Gensim zu installieren, legen Sie das Gebietsschema in 'ansible.cfg' fest: Verwenden Sie zum Beispiel' module_lang = en_US.UTF-8' ([Dokumentation] (http://docs.ansible.com/ansible /intro_configuration.html#module-lang)) –

0

Ich hatte das gleiche Problem mit meinem Ubuntu 15.10. Schließlich , ich löste es durch das Paket von pypi herunterladen und installieren Sie es manuell durch

python setup.py install 

Dann erfolgreich installierte ich es und es funktioniert jetzt gut.

Verwandte Themen