Python gensim-和#x27的pip安装;ascii';编解码器可以';t解码第53位的字节0xe2
我正在尝试在我的虚拟机上使用pip安装gensim。但是,我得到了一个错误:Python gensim-和#x27的pip安装;ascii';编解码器可以';t解码第53位的字节0xe2,python,python-2.7,pip,Python,Python 2.7,Pip,我正在尝试在我的虚拟机上使用pip安装gensim。但是,我得到了一个错误: 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'))" inst
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)
有什么想法吗?我解决了,原来是内存问题。这里有一个很好的关于交换内存的教程,非常有用-我也遇到了同样的问题,并找到了答案 只是 导出LC_ALL=C
解决了我的问题我的ubuntu 15.10也有同样的问题。 最后,我通过从pypi下载包并手动安装解决了这个问题
python setup.py install
然后我成功地安装了它,现在它运行良好。如果您使用ansible安装gensim,请在
ansible.cfg
中设置区域设置:例如,使用module\u lang=en\u US.UTF-8
)
python setup.py install