Reputation: 4940
When I try to execute more than an operation using SublimeREPL
and Python3 I get :
C:/Users/Name/Anaconda3/envs/keras/python.exe: can't open file '$file_basename': [Errno 2] No such file or directory
.
Following this answer I have modified the sublime-settings
file adding "default_extend_env": {"PATH": "{PATH};C:/Users/Simone/Anaconda3/envs/keras"}
.
I have also add the path C:/Users/Name/Anaconda3/envs/keras/python.exe
in Main.sublime-menu
file, but I'm still getting the same error message.
Upvotes: 1
Views: 5156
Reputation: 1
did you save the file?
I have had the same problem. I saved the file and it worked
Upvotes: 0
Reputation: 141
When your cursor not in the current python file [may be in output panel of the SublimeREPL
or may be in empty tab/file] and if you are running
Tools->SublimeREPL->python->python - RUN currentfile
then you may get below error. Because there is no file's path for that output panel file or for an empty file.
C:/Users/Name/Anaconda3/envs/keras/python.exe: can't open file '$file_basename': [Errno 2] No such file or directory
So, focus your cursor in the current python file and try it again.
This may be one of the case.I faced this problem and after few trials i figured it out.
Upvotes: 1
Reputation: 79
You do not have to modify you sublime-setttings file. I suppose that you have your subl configured to run with python3 but it doesn't matter. When you use ctrl + b for running your code, you must be sure that you have something written. Is only that, if you use ctrl + b but you don't have anything in your code file is normal that you were obtaining that error.
Upvotes: 2