在 ubuntu 将 setuptools 从 20.10.1 降级到 18.2

Downgrade setuptools from 20.10.1 to 18.2 on ubuntu

我的 ubuntu 虚拟环境中有以下设置

pip list argparse (1.2.1) pip (1.5.4) setuptools (20.10.1) wsgiref (0.1.2)

我想安装 setuptools 18.2 作为项目要求。请告知我该怎么做

我刚测试过,看起来 pip install setuptools==18.2 应该可以。

$ pip install setuptools==20.10.1
You are using pip version 6.1.1, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting setuptools==20.10.1
  Using cached setuptools-20.10.1-py2.py3-none-any.whl
Installing collected packages: setuptools
  Found existing installation: setuptools 15.0
    Uninstalling setuptools-15.0:
      Successfully uninstalled setuptools-15.0
Successfully installed setuptools-20.10.1

$ pip list
You are using pip version 6.1.1, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
pip (6.1.1)
setuptools (20.10.1)                                     <<<<<<<<<<<<<<<<<< look here

$ pip install setuptools==18.2
You are using pip version 6.1.1, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting setuptools==18.2
  Using cached setuptools-18.2-py2.py3-none-any.whl
Installing collected packages: setuptools
  Found existing installation: setuptools 20.10.1
    Uninstalling setuptools-20.10.1:
      Successfully uninstalled setuptools-20.10.1
Successfully installed setuptools-18.2

$ pip list
You are using pip version 6.1.1, however version 8.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
pip (6.1.1)
setuptools (18.2)                                         <<<<<<<<<<<<<<<<<< look here