4

Using virtualenv with -p python2 While installing pip install gluoncv it errors out with following error

Requirement already satisfied: setuptools in ./mxv16_p2/lib/python2.7/site-packages (45.0.0)
ERROR: Package 'setuptools' requires a different Python: 2.7.12 not in '>=3.5'
Chaitanya Bapat
  • 3,381
  • 6
  • 34
  • 59

1 Answers1

7

Thanks to https://github.com/pypa/virtualenv/issues/1493

Specifically this comment : https://github.com/pypa/virtualenv/issues/1493#issuecomment-576250710

pip install --upgrade 'setuptools<45.0.0'

It expected a lower version of setuptools and hence pip install --upgrade to lower version [i.e. downgraded]

Chaitanya Bapat
  • 3,381
  • 6
  • 34
  • 59
  • If I understood correctly it should not be necessary if the distributions are downloaded directly from _PyPI_ or any other fully compatible index. It could be necessary if you are downloading from an index that is not full-featured. – sinoroc Apr 02 '20 at 13:36
  • Unfortunately I had to do that. Any idea why my "index was not full-featured"? – Chaitanya Bapat Apr 04 '20 at 18:46
  • If you are using _PyPI_ then it should not be necessary, unless I misunderstood something. See for example [this comment](https://github.com/pypa/virtualenv/issues/1493#issuecomment-578226398). I don't know what your exact setup is. There are some more details in the _GitHub_ discussion. – sinoroc Apr 04 '20 at 19:22