From 8d313e014fa15eaec9fae38080ff19d462bfdf1e Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Fri, 22 Feb 2019 00:32:27 +0100 Subject: [PATCH] Check for specific Python versions first on unix, see davidhalter/jedi-vim#870 --- jedi/api/environment.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jedi/api/environment.py b/jedi/api/environment.py index 38e21f1c..b9616cce 100644 --- a/jedi/api/environment.py +++ b/jedi/api/environment.py @@ -210,7 +210,10 @@ def _try_get_same_env(): checks = (r'Scripts\python.exe', 'python.exe') else: # For unix it looks like Python is always in a bin folder. - checks = ('bin/python',) + checks = ( + 'bin/python%s.%s' % (sys.version_info[0], sys.version[1]), + 'bin/python', + ) for check in checks: guess = os.path.join(sys.exec_prefix, check) if os.path.isfile(guess):