Cannot run .py files


#1

Cannot run python files in Atom; something about PATH not correct! In addition, no response when I try to open “Open config Folder”.Finally no response from menu item : Package - Script - config

My pc : Windows 7 Prof., installed- hydrogen, Script, etc


#2

Have you installed Python on your computer?


#3

Yes, I have.Thanks for replying to my issue. After over three hours of fruitless research on the issue, I have concluded that Atom is for the advanced user, which I am not, so I have uninstalled it. from my pc.


#4

I find this slightly worrying, considering that you are a programmer. The issue at hand is a simple command resolution issue and you will encounter it again even if you only use editors with built-in Python support like PyCharm. If you want proof, search for the term PATH here and on Stack Overflow and anywhere else you go for coding help. It’s a very common issue that can have a variety of causes, but they’re all easy to fix. To resolve it, you need to understand how the shell looks for commands and the possible points of failure, none of which is terribly complicated in the big picture.

All you have to do is answer my questions and I can walk you through the process of figuring out where the disconnect is and how to fix it if it needs to be fixed. At the end, you will be better equipped to handle similar issues in the future. After making sure that you’ve installed Python, the next step is to open your preferred command line (I recommend cmder, as it has many more features and is much more comfortable to use than cmd.exe) and type in python -v. If that works, then all you need to do is restart Atom so that it picks up the new environment variables. If it doesn’t, then you need to add the bin/ folder in the Python directory to your PATH environment variable. If it’s not in there already, this will likely cause you trouble in the future since a lot of normal uses of Python interact with the command line. You might not notice it if you’re just developing in PyCharm or Jupyter, but it limits your options for the future.

If you can use Python from the command line and Atom still isn’t picking it up, then there’s something weirder going on.


#5

OK! Now that I have been promoted to status of ‘programmer’, I will give Atom another go. Will let you know how it turns out.

DamnedScholar
January 10 |

I find this slightly worrying, considering that you are a programmer. The issue at hand is a simple command resolution issue and you will encounter it again even if you only use editors with built-in Python support like PyCharm. If you want proof, search for the term PATH here and on Stack Overflow and anywhere else you go for coding help. It’s a very common issue that can have a variety of causes, but they’re all easy to fix. To resolve it, you need to understand how the shell looks for commands and the possible points of failure, none of which is terribly complicated in the big picture.

All you have to do is answer my questions and I can walk you through the process of figuring out where the disconnect is and how to fix it if it needs to be fixed. At the end, you will be better equipped to handle similar issues in the future. After making sure that you’ve installed Python, the next step is to open your preferred command line (I recommend cmder, as it has many more features and is much more comfortable to use than cmd.exe) and type in python -v. If that works, then all you need to do is restart Atom so that it picks up the new environment variables. If it doesn’t, then you need to add the bin/ folder in the Python directory to your PATH environment variable. If it’s not in there already, this will likely cause you trouble in the future since a lot of normal uses of Python interact with the command line. You might not notice it if you’re just developing in PyCharm or Jupyter, but it limits your options for the future.

If you can use Python from the command line and Atom still isn’t picking it up, then there’s something weirder going on.

Visit Topic or reply to this email to respond.

In Reply To

DoblDon
January 10 |

Yes, I have.Thanks for replying to my issue. After over three hours of fruitless research on the issue, I have concluded that Atom is for the advanced user, which I am not, so I have uninstalled it. from my pc.
Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.


#6

I honestly think that the things you’re frustrated with regarding Atom are all generic problems that anyone who’s serious about using Python or anything more technical should tackle and overcome at some point. I’ve been there. I’ve failed and had more experienced people walk me through it, and now I walk other people through it. Talk to me and tell me where the installation instructions are breaking down for you and I will coach you until you’re able to find out what the problem is and fix it for yourself.

Yes, Atom requires a bit more commitment than most programs. Yes, it will demand that you understand some things about how your computer works that other programs don’t. But these skills that Atom requests of its users are part of a lot of the work that gets done using programming languages, and once you’re comfortable with them, they will transfer to your other work. If it turns out that you just don’t like using Atom, then it’s not for you, but if you’re feeling like the struggle you’ve had in this thread is going to be wasted time, I disagree.


#7

Loaded up Atom, installed Hydrogen and opened a .py file. Could not locate the icon to run python, (it was in the upper right corner of the screen when my challenges with Atom started). So decided to try: highlighted python script and Shift+Enter; followed pop-up directions:python -m pip install ipykernelpython -m ipykernel install --user
Same pop-upSo I rebooted Atom. Tried running .py file again. Bingo!!Tried other files; no problems!
Thanks for your advice. It makes a lot of sense. So, I am back in the Atom sphere!

DamnedScholar
January 11 |

DoblDon:
OK! Now that I have been promoted to status of ‘programmer’, I will give Atom another go. Will let you know how it turns out.

I honestly think that the things you’re frustrated with regarding Atom are all generic problems that anyone who’s serious about using Python or anything more technical should tackle and overcome at some point. I’ve been there. I’ve failed and had more experienced people walk me through it, and now I walk other people through it. Talk to me and tell me where the installation instructions are breaking down for you and I will coach you until you’re able to find out what the problem is and fix it for yourself.

Yes, Atom requires a bit more commitment than most programs. Yes, it will demand that you understand some things about how your computer works that other programs don’t. But these skills that Atom requests of its users are part of a lot of the work that gets done using programming languages, and once you’re comfortable with them, they will transfer to your other work. If it turns out that you just don’t like using Atom, then it’s not for you, but if you’re feeling like the struggle you’ve had in this thread is going to be wasted time, I disagree.

Visit Topic or reply to this email to respond.

In Reply To

DoblDon
January 11 |

OK! Now that I have been promoted to status of ‘programmer’, I will give Atom another go. Will let you know how it turns out. DamnedScholar January 10 | I find this slightly worrying, considering that you are a programmer. The issue at hand is a simple command resolution issue and you will …
Visit Topic or reply to this email to respond.

To unsubscribe from these emails, click here.


#8

I don’t know where this icon you speak of came from, but the best way to find a package command is to use the Command Palette and search for the package’s name. Packages don’t have to add commands with their names attached, but it’s customary to do so, such as hydrogen:run and script:kill-process. They probably have default keybindings, as well.