pip和yum的某种内在联系

由于学业需要,开始接触linux,选择了centos6.5

1.机器学习中,我用python,学习了如何进行数据处理,期间,需要使用matplotlib进行绘图处理,结果

#pip install matplotlib显示:


Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/matplotlib
Storing debug log for failure in /root/.pip/pip.log


2. 又安装pandas

#pip install pandas,显示:

Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/matplotlib/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-ModyBS-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/matplotlib
Traceback (most recent call last):
  File "/usr/bin/pip", line 11, in <module>
    sys.exit(main())
  File "/usr/local/python27/lib/python2.7/site-packages/pip/__init__.py", line 185, in main
    return command.main(cmd_args)
  File "/usr/local/python27/lib/python2.7/site-packages/pip/basecommand.py", line 161, in main
    text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 105: ordinal not in range(128)
3.网上搜索,说和python版本有关,因为centos6.5自带python2.6,我自己下载编译了python2.7,并且用python2.7编译安装了pip1.5,所以我才matplotlib默认需要python2.6来编译的缘故。

4.于是有搜到可以yum安装,

# yum install python-matplotlib -y

结果可以用,并且使用python2.6可以import matplotlib

而用自己装的2.7却找不到

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值