We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2bf3530 + 8467a0c commit 9ae917fCopy full SHA for 9ae917f
jupyter_client/manager.py
@@ -174,6 +174,15 @@ def format_kernel_cmd(self, extra_arguments=None):
174
else:
175
cmd = self.kernel_spec.argv + extra_arguments
176
177
+ if cmd and cmd[0] == 'python':
178
+ # executable is 'python', use sys.executable.
179
+ # These will typically be the same,
180
+ # but if the current process is in an env
181
+ # and has been launched by abspath without
182
+ # activating the env, python on PATH may not be sys.executable,
183
+ # but it should be.
184
+ cmd[0] = sys.executable
185
+
186
ns = dict(connection_file=self.connection_file,
187
prefix=sys.prefix,
188
)
0 commit comments