Home:ALL Converter>Same Interpreter(?), Different Package Version in Spyder

Same Interpreter(?), Different Package Version in Spyder

Ask Time:2015-06-17T05:37:28         Author:Michael

Json Formatter

I got this import error, which as this answer indicates occurs because the requests package is out of date. I updated the package using pip, but still got the same error. So I tried from requests.utils import to_native_string, which to my surprise works just fine in either the command prompt shell or IDLE, but throws an error in Spyder. I checked the version of the requests package:

import requests
print(requests.__version__)

The version number in Spyder ('1.2.3') is indeed different from the version number in IDLE or the cmd shell ('2.7.0'). I am a loss to explain why this would be the case, however, because Spyder points to the same interpreter at C:\Python27\python.exe and if I check the version of python being used:

import sys
print(sys.version)

I get the same result everywhere: '2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]'.

Author:Michael,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/30878697/same-interpreter-different-package-version-in-spyder
yy