ImportError: No module named setuptools

Posted karihou

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ImportError: No module named setuptools相关的知识,希望对你有一定的参考价值。

报错:

[[email protected] rpy2-2.8.5]# python setup.py install
Traceback (most recent call last):
  File "setup.py", line 7, in <module>
    from setuptools import setup, Extension
ImportError: No module named setuptools

解决办法,下载

[[email protected] rpy2-2.8.5]# wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
--2017-03-09 01:59:42--  http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
Resolving pypi.python.org... 151.101.76.223, 2a04:4e42:12::223
Connecting to pypi.python.org|151.101.76.223|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz [following]
--2017-03-09 01:59:42--  https://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
Connecting to pypi.python.org|151.101.76.223|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 256862 (251K) [application/octet-stream]
Saving to: “setuptools-0.6c11.tar.gz”

100%[=============================================================================================================================>] 256,862      786K/s   in 0.3s    

2017-03-09 01:59:43 (786 KB/s) - “setuptools-0.6c11.tar.gz” saved [256862/256862]

安装

[[email protected] setuptools-0.6c11]# python setup.py build
[[email protected] setuptools-0.6c11]# python setup.py install

 

以上是关于ImportError: No module named setuptools的主要内容,如果未能解决你的问题,请参考以下文章

ImportError : No module named graphics

python27 ImportError: No module named site

Python中ImportError: No module named request

ImportError: No module named win32api

ImportError: No module named zookeeper 问题解决

ImportError: No module named PIL