File tree 1 file changed +3
-2
lines changed
src/lightning_app/utilities
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -299,10 +299,11 @@ def _check_environment_and_redirect():
299
299
If not, this utility tries to redirect the ``lightning`` call to the environment executable (prompting the user to
300
300
install lightning for them there if needed).
301
301
"""
302
- env_executable = shutil .which ("python" )
302
+ env_executable = os .path .realpath (shutil .which ("python" ))
303
+ sys_executable = os .path .realpath (sys .executable )
303
304
304
305
# on windows, the extension might be different, where one uses `.EXE` and the other `.exe`
305
- if env_executable .lower () != sys . executable .lower ():
306
+ if env_executable .lower () != sys_executable .lower ():
306
307
logger .info (
307
308
"Lightning is running from outside your current environment. Switching to your current environment."
308
309
)
You can’t perform that action at this time.
0 commit comments