使用pip安装pthon包

安装pip需要先装setuptools

https://pypi.python.org/pypi/setuptools

然后下载pip安装包

https://pypi.python.org/pypi/pip#downloads

 

使用pip安装Numpy出现如下错误

Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/Numpy/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-IF8j7I-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/Numpy
Storing debug log for failure in /root/.pip/pip.log

网友提示需要安装python-devel

 yum install python-devel

安装完成之后在用pip装Numpy 安装成功,我已经安装了gcc g++等编译器如果没有的话估计也会出错

你可能感兴趣的:(python)