python - pip install matplotlib 安装失败
大家讲道理
大家讲道理 2017-04-17 13:07:11
0
1
947

错误提示:

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)

如果看的话,有图:

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(1)
洪涛

Problem found. This question can be deleted.


As requested, please tell us about the resolution process.

Of course it was all kinds of pain in the beginning, all kinds of analysis errors, and all kinds of searches. . .

Then I suddenly discovered that when I was installing something a few months ago, I needed Python 2.7, so I replaced the system default python 2.6, but yum does not currently support 2.7, so I let yum use it myself. 2.6

That’s the problem. During installation, python version 2.6 is called, while when compiling and running, python version 2.7 is called. In short, it is not clear under what circumstances they are called, and it is a mess.

Simply uninstall python 2.7 and change the default to 2.6. I won’t write down the specific operations one by one. From now on, there will be no problem compiling and installing Shenma.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template