linux中安装easy_install(setuptools)


如果是类似于ubuntu的带桌面的系统直接下载安装就可以了,以下是针对centOS的命令行安装方法

最好先查看版本号,根据版本来选择安装方法,终端命令如下

# lsb_release -a

版本号是5.X的依次执行以下命令

> wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py
> python ez_setup.py --insecure

版本号是6以及以上的

 wget https://bootstrap.pypa.io/ez_setup.py -O - | python

如果以上命令提示权限相关问题,则用superuser权限执行

> wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python

如果需要自行指定user路径,则

> wget https://bootstrap.pypa.io/ez_setup.py -O - | python - --user

相关内容