有两种方式安装Python Setuptools包管理工具:
1.通过pip安装
1)安装pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py
2)安装setuptools
[root@pan netdisc]# pip install -U setuptools
Collecting setuptools
Downloading https://files.pythonhosted.org/packages/37/06/754589caf971b0d2d48f151c2586f62902d93dc908e2fd9b9b9f6aa3c9dd/setuptools-40.6.3-py2.py3-none-any.whl (573kB)
100% |████████████████████████████████| 573kB 21.4MB/s
Installing collected packages: setuptools
Found existing installation: setuptools 0.9.8
Uninstalling setuptools-0.9.8:
Successfully uninstalled setuptools-0.9.8
Successfully installed setuptools-40.6.3
2.通过源码安装
当前最新版:setuptools-40.6.3.zip 。
解压之后进入解压后的目录,执行下面的命令:
python setup.py build
python setup.py install
参考文章:
- CentOS7安装setuptools;
- Building and Distributing Packages with Setuptools-Developer’s Guide;
- Windows 10手动安装python 2.7.8;
最新评论
本来在正常下载,突然就不能下载,并出现报错:a socket operation was attempted to an unreachable network。请问是什么原因呢
试了,还是不行,能不能更新一下
试了,确实不行,能不能更新一下
也推荐一下我自己写的 https://twitdown.com