File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -683,14 +683,15 @@ public struct PythonInterface {
683683 import sys
684684 import os
685685
686- # Some Python modules expect to have at least one argument in `sys.argv`.
686+ # Some Python modules expect to have at least one argument in `sys.argv`:
687687 sys.argv = [ " " ]
688688
689689 # Some Python modules require `sys.executable` to return the path
690690 # to the Python interpreter executable. In Darwin, Python 3 returns the
691- # main process executable path instead.
691+ # main process executable path instead:
692692 if sys.version_info.major == 3 and sys.platform == " darwin " :
693- sys.executable = os.path.join(sys.exec_prefix, " bin " , " python3 " )
693+ executable_name = " python{}.{} " .format(sys.version_info.major, sys.version_info.minor)
694+ sys.executable = os.path.join(sys.exec_prefix, " bin " , executable_name)
694695 """ )
695696 }
696697
You can’t perform that action at this time.
0 commit comments