0

please help.

I have install two version of "requests" module by Python. And in result i have version 2.2.1 and 2.7.0

But by default I get

python2 -c 'import requests; print requests.__version__'
2.2.1

How to change to 2.2.7?

Vasia SowSow
  • 31
  • 1
  • 6

1 Answers1

0

you can locate your python in this path :usr/bin/python. In your case you will have 2 versions 2.2 2.7.

While executing python code for `2.2', do this :

usr/bin/python2.2 code.py - this will use 2.2. Do the same for 2.7

sudhishkr
  • 3,318
  • 5
  • 33
  • 55
  • yes I find it, but what i must do? remove 2.2 version? – Vasia SowSow Jun 02 '15 at 18:01
  • your question was to run the python file in version `2.7`, and the solution to that is given above. if you want to remove `2.2` you can `yum remove usr/bin/python2.2`, and you should be good. – sudhishkr Jun 02 '15 at 18:03
  • Thanks, but i again have trouble, i change it but after run script i again have error : AttributeError: 'Response' object has no attribute 'is_redirect' And version agani changed to 2.2.1 – Vasia SowSow Jun 02 '15 at 18:37