Python Forum
Sublime Text Editor not recognizing Python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sublime Text Editor not recognizing Python
#1
I am just trying to run a hello world file through sublime text and it is not recognizing python. I am currently taking an intro to programming class online, and am working from a book. The book wanted me to go to Tools>Build System>New Build System, and type in this code
{
"cmd":["python3.10","-u","$file"],
}

Then create a new folder called python_work and create my save my hello-world.py file in that folder. I have the code written out:
print("Hello Python world!")

But when I go to build it, I get this message:
[WinError 2] The system cannot find the file specified
[cmd: ['python3.10', '-u', 'C:\\Users\\Roberto\\pyhon_work\\hello_world.py']]
[dir: C:\Users\Roberto\pyhon_work]
[path: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Users\Roberto\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\Roberto\AppData\Local\Programs\Python\Python310\;C:\Users\Roberto\AppData\Local\Microsoft\WindowsApps;C:\Users\Roberto\.dotnet\tools]
[Finished]


I've tried uninstalling both Sublime Text and Python numerous times. If I open a command prompt and type python, or just open the python application and type out:
print("Hello Python world!")

it works just fine. What am I doing wrong? I'm working with Python3.10.5 by the way.
Reply
#2
(Jun-13-2022, 03:17 PM)elroberto Wrote: I am just trying to run a hello world file through sublime text and it is not recognizing python. I am currently taking an intro to programming class online, and am working from a book. The book wanted me to go to Tools>Build System>New Build System, and type in this code
{
"cmd":["python3.10","-u","$file"],
}

Then create a new folder called python_work and create my save my hello-world.py file in that folder. I have the code written out:
print("Hello Python world!")

But when I go to build it, I get this message:
[WinError 2] The system cannot find the file specified
[cmd: ['python3.10', '-u', 'C:\\Users\\Roberto\\pyhon_work\\hello_world.py']]
[dir: C:\Users\Roberto\pyhon_work]
[path: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Users\Roberto\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\Roberto\AppData\Local\Programs\Python\Python310\;C:\Users\Roberto\AppData\Local\Microsoft\WindowsApps;C:\Users\Roberto\.dotnet\tools]
[Finished]


I've tried uninstalling both Sublime Text and Python numerous times. If I open a command prompt and type python, or just open the python application and type out:
print("Hello Python world!")

it works just fine. What am I doing wrong? I'm working with Python3.10.5 by the way.

This may answer your question:
https://forum.sublimetext.com/t/error-wh...file/64255
Sig:
>>> import this

The UNIX philosophy: "Do one thing, and do it well."

"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse

"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein
Reply
#3
From this link, it appears sublime on supports up to python 3.8
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags


Reply
#4
(Jun-13-2022, 03:27 PM)rob101 Wrote:
(Jun-13-2022, 03:17 PM)elroberto Wrote: I am just trying to run a hello world file through sublime text and it is not recognizing python. I am currently taking an intro to programming class online, and am working from a book. The book wanted me to go to Tools>Build System>New Build System, and type in this code
{
"cmd":["python3.10","-u","$file"],
}

Then create a new folder called python_work and create my save my hello-world.py file in that folder. I have the code written out:
print("Hello Python world!")

But when I go to build it, I get this message:
[WinError 2] The system cannot find the file specified
[cmd: ['python3.10', '-u', 'C:\\Users\\Roberto\\pyhon_work\\hello_world.py']]
[dir: C:\Users\Roberto\pyhon_work]
[path: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Users\Roberto\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\Roberto\AppData\Local\Programs\Python\Python310\;C:\Users\Roberto\AppData\Local\Microsoft\WindowsApps;C:\Users\Roberto\.dotnet\tools]
[Finished]


I've tried uninstalling both Sublime Text and Python numerous times. If I open a command prompt and type python, or just open the python application and type out:
print("Hello Python world!")

it works just fine. What am I doing wrong? I'm working with Python3.10.5 by the way.

This may answer your question:
https://forum.sublimetext.com/t/error-wh...file/64255
Reply
#5
Thank you! That was it!
Reply
#6
(Jun-13-2022, 03:47 PM)elroberto Wrote: Thank you! That was it!

No worries; glad to help.
Sig:
>>> import this

The UNIX philosophy: "Do one thing, and do it well."

"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse

"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  while loop not working-I am using sublime text editor mma_python 4 1,125 Feb-05-2023, 06:26 PM
Last Post: deanhystad
  Music Notation editor; how to build the editor? direction to go? philipbergwerf 1 1,680 Jan-01-2022, 04:56 PM
Last Post: Larz60+
  Code folding in Sublime Text Mondata 2 2,797 Mar-12-2021, 04:16 PM
Last Post: Mondata
  How to link Sublime Text 3 Build system to Python 3.9 Using Windows 10 Fanman001 2 4,594 Mar-04-2021, 03:09 PM
Last Post: martpogs
  Sublime Text TechNitium 4 2,759 Jan-23-2021, 08:41 AM
Last Post: TechNitium
  sublime & intellisence luke83 0 1,626 Nov-20-2020, 08:26 PM
Last Post: luke83
  pylint not recognizing some objects in VS Code marceloreborn 1 1,790 Jul-31-2020, 01:36 AM
Last Post: Larz60+
  Question re: running code in Editor (i.e. Atom) vs Python interpreter rok 3 2,419 Jun-29-2020, 09:20 PM
Last Post: bowlofred
  Sublime Text + Anaconda not indenting Python code correctly Maxximiliann 0 1,987 Jun-13-2020, 06:09 PM
Last Post: Maxximiliann
  switching from pycharm to sublime issue Drifter 2 1,988 Jun-09-2020, 09:19 PM
Last Post: Drifter

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020