Python第三方模块中一般会自带setup.py文件,在Windows环境下,我们只需要使用命令

cd c:\Temp\foo

python setup.py install

两个命令就可以完成第三方模块的安装了。第一个cd命令将当前目前切换到待安装的第三方模块的目录下(这里假设第三方模块解压后的目录为c:\Temp\foo),第二个命令就执行安装了。安装的过程中可能会出现“ImportError: No module named setuptools”的错误提示,这是新手很常遇见的错误提示。不用担心,这是因为Windows环境下Python默认是没有安装setuptools这个模块的,这也是一个第三方模块。下载安装的脚本https://bootstrap.pypa.io/ez_setup.py,下载该脚本后运行

python ez_setup.py

即可。脚本会自动判断python的版本,自动下载setuptools,安装。

如果是Linux环境的话,可能稍微麻烦一点,可能是笔者能力不够吧。下面简单说一下Linux下setuptools的安装过程。同样是在http://pypi.python.org/pypi/setuptools这个地方下载setuptools-0.6c11-py2.7.egg文件到本地,使用chmod +x setuptools-0.6c11-py2.7.egg命令使文件成为可执行文件。然后运行sudo sh setuptools-0.6c11-py2.7.egg命令完成安装。

上述方法经笔者测试可行。如果有什么问题,可以留言。

ImportError: No module named setuptools的更多相关文章

  1. python打怪之路【第二篇】:ImportError: No module named setuptools

    在python安装第三方模块时出现如下错误: python错误:ImportError: No module named setuptools这句错误提示的表面意思是:没有setuptools的模块, ...

  2. Python安装模块出错(ImportError: No module named setuptools)解决方法

    原地址:http://www.cnblogs.com/BeginMan/archive/2013/05/28/3104928.html 在window平台下安装第三方模块时,出现这样的错误:

  3. python setup.py install 报错ImportError: No module named setuptools

    学习光荣之路python课程时,使用python setup.py install安装其他模块时,第一次安装某模块成功了.安装另一模块却报错ImportError: No module named s ...

  4. python错误 ImportError: No module named setuptools 解决方法[转]

    在python运行过程中出现如下错误: python错误:ImportError: No module named setuptools这句错误提示的表面意思是:没有setuptools的模块,说明p ...

  5. from setuptools import setup ImportError: No module named setuptools【转】

    转自:http://www.cnblogs.com/chinacloud/archive/2010/12/24/1915644.html from setuptools import setupImp ...

  6. ubuntu ImportError: No module named setuptools 一句命令解决方案

    https://blog.csdn.net/Super_jm_/article/details/81947563 使用pip安装文件时候提示  ImportError: No module named ...

  7. pip 安装使用 ImportError: No module named setuptools 解决方法

    安装过程详见这篇博客: http://www.ttlsa.com/python/how-to-install-and-use-pip-ttlsa/ 安装后运行到:python setup.py ins ...

  8. 安装django 提示ImportError: No module named setuptools

    安装django前要先安装setuptools 先安装一些必要的包,否则会报错:Python build finished, but the necessary bits to build these ...

  9. ImportError: No module named setuptools 解决方案

    shell中输入: wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz --no-che ...

随机推荐

  1. the core or essence of a computer

    COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION The ALU is that part ...

  2. the OS maintains a number of queues

    COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION To do its job, the OS ...

  3. Android之Fragment学习笔记②(Fragment生命周期)

    一. Fragment生命周期图                                  二.Fragment生命周期方法介绍 Fragment的生命周期和activity生命周期很像,其生 ...

  4. Wordpress更改后台地址

    wordpress默认的后台地址是 xx/wp-admin  或xx/wp-login.php ,谁都知道感觉很不安全, 方法一:使用插件 通过插件在地址上加上只有你知道的参数才能访问 1.后台搜索插 ...

  5. CheckedListBoxControl 使用

    绑定用法 StringBuilder sb = new StringBuilder(); sb.AppendFormat("select id, filename, addtime from ...

  6. NAT123 解决80端口被封的问题

    使用的服务器不知什么原因80端口无法使用了,好像是被封了,用的移动的固定IP,移动线路一直是不稳定 关键是移动的回答竟然是找不到哪里封的 是不是被屏蔽了,无奈使用了NAT123做处理.试了下还是管用. ...

  7. DHT(Distributed Hash Table) Translator

    DHT(Distributed Hash Table) Translator What is DHT? DHT is the real core of how GlusterFS aggregates ...

  8. Flash Socket简单调试工具

    写了一个简单的Flash Socket调试工具,可用来简单调试本地或者外部socket服务器,使用的时候注意Flash socket的安全策略问题,有问题请联系sky-wang@qq.com.

  9. http://blog.csdn.net/tiantiandjava/article/details/46777051

    http://blog.csdn.net/tiantiandjava/article/details/46777051

  10. NSUserDefaults的小封装

    //保存 -(void)saveToUserDefaults:(NSString*)tosaveedString withKey:(NSString *)tosaveedKey {  NSUserDe ...