Linux 安装 Python libsvm - 相关问题

最近项目需求,要用到libsvm,但是安装一直失败,后来改了了系统编码OK了。。

1、 安装方法:
pip install libsvm
2、 安装失败:
Looking in indexes: http://mirrors.jd.com/pypi/simple
Collecting libsvm==3.23.0
  Downloading http://mirrors.jd.com/pypi/packages/ff/01/5506c690789f1d76105815d826f213ce724960851be45799d7023ed1aee7/libsvm-3.23.0.tar.gz
    ERROR: Command errored out with exit status 1:
     command: /usr/local/anaconda3/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-gn88vgyg/libsvm/setup.py'"'"'; __file__='"'"'/tmp/pip-install-gn88vgyg/libsvm/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-gn88vgyg/libsvm/pip-egg-info
         cwd: /tmp/pip-install-gn88vgyg/libsvm/
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-gn88vgyg/libsvm/setup.py", line 17, in <module>
        LONG_DESCRIPTION = readme.read()
      File "/usr/local/anaconda3/lib/python3.6/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 2235: ordinal not in range(128)
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
3、 解决办法:
vim   ~/.bashrc
export LANG="en_US.UTF-8"
source  ~/.bashrc
4、 问题解决

声明: 总结学习,有问题或不当之处,可以批评指正哦,谢谢。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值