安装scikit-image问题

参考地址:

scikit-image

http://scikit-image.org/download.html

 

pip install  scikit-image

出现报错

Failed building wheel for subprocess32

采用

python -m easy_install scikit-image

依然报错

 

 换种方式

download whl文件

pip install the .whl file

在python package中

https://pypi.python.org/pypi/scikit-image

下载了scikit_image-0.13.0-cp27-cp27m-manylinux1_x86_64.whl (md5)

wget https://pypi.python.org/packages/7d/72/62b7f3a3120d8d3e9d9b95031b4096e310ea35b3b56c3d0640633e32dd48/scikit_image-0.13.0-cp27-cp27m-manylinux1_x86_64.whl#md5=7eb1d73e02f9b709bb21a6241ad3743a

 

pip install scikit_image-0.13.0-cp27-cp27m-manylinux1_x86_64.whl

报错

 scikit_image-0.13.0-cp27-cp27m-manylinux1_x86_64.whl is not a supported wheel on this platform.

 进入python中

>>> import pip
>>> pip.pep425tags.get_supported()
[('cp27', 'cp27mu', 'manylinux1_x86_64'), ('cp27', 'cp27mu', 'linux_x86_64'), ('cp27', 'none', 'manylinux1_x86_64'), ('cp27', 'none', 'linux_x86_64'), ('py2', 'none', 'manylinux1_x86_64'), ('py2', 'none', 'linux_x86_64'), ('cp27', 'none', 'any'), ('cp2', 'none', 'any'), ('py27', 'none', 'any'), ('py2', 'none', 'any'), ('py26', 'none', 'any'), ('py25', 'none', 'any'), ('py24', 'none', 'any'), ('py23', 'none', 'any'), ('py22', 'none', 'any'), ('py21', 'none', 'any'), ('py20', 'none', 'any')]
>>>

不支持cp27m支持cp27mu

所以重新下载

cp27mu版本

scikit_image-0.13.0-cp27-cp27mu-manylinux1_x86_64.whl (md5)

pip install scikit_image-0.13.0-cp27-cp27mu-manylinux1_x86_64.whl

依然报错

Failed building wheel for subprocess32

 

 

于是采用源码安装

scikit-image-0.13.0.tar.gz (md5)

https://pypi.python.org/packages/f0/a2/918366ba9095ed4c07646be903c795f375d978ee418136eecb0571559719/scikit-image-0.13.0.tar.gz#md5=c92b682ed77b568218423b7afe454996

.tar.gz解压命令

1) tar调用gzip 
  gzip是GNU组织开发的一个压缩程序,.gz结尾的文件就是gzip压缩的结果。与gzip 
相对的解压程序是gunzip。tar中使用-z这个参数来调用gzip。下面来举例说明一下 
: 
  # tar -czf all.tar.gz *.jpg 
  这条命令是将所有.jpg的文件打成一个tar包,并且将其用gzip压缩,生成一个 
gzip压缩过的包,包名为all.tar.gz 
  # tar -xzf all.tar.gz 
  这条命令是将上面产生的包解开。 

 

python setup.py build_ext -i

报错

gcc: skimage/_shared/geometry.c
/bin/bash: gcc: command not found
/bin/bash: gcc: command not found

yum install gcc

Package gcc-4.8.5-4.el7.x86_64 already installed and latest version
Nothing to do

 

You can use pip to automatically install the runtime dependencies as follows:

pip install -r requirements.txt

还是报错

unable to execute gcc: No such file or directory
error: command 'gcc' failed with exit status 1

确定还是gcc的问题了

 

which   gcc

/usr/bin/which: no gcc in (/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/tsso_openssh/bin:/root/bin)

 

whereis   gcc

gcc: /usr/lib/gcc /usr/libexec/gcc /usr/share/man/man1/gcc.1.gz

 

解决了gcc的问题,执行依然报错

 

最有解决方案

yum -y install gcc gcc-c++ kernel-devel

yum -y install python-devel libxslt-devel libffi-devel openssl-devel

解决

 

查看系统信息等常用命令参考

http://liguxk.blog.51cto.com/129038/152912

 

posted @ 2017-09-14 17:21  琦在江湖飘  阅读(2293)  评论(0编辑  收藏  举报