Skip to content

Commit

Permalink
Check for specific Python versions first on unix, see davidhalter/jed…
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhalter committed Feb 21, 2019
1 parent a79d386 commit 8d313e0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion jedi/api/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]),

This comment has been minimized.

Copy link
@blueyed

blueyed Feb 21, 2019

Contributor

Also add 'bin/python%s' % (sys.version_info[0]), inbetween maybe?

This comment has been minimized.

Copy link
@davidhalter

davidhalter Feb 22, 2019

Author Owner

Done!

'bin/python',
)
for check in checks:
guess = os.path.join(sys.exec_prefix, check)
if os.path.isfile(guess):
Expand Down

0 comments on commit 8d313e0

Please sign in to comment.