thewaywewalk thewaywewalk - 1 year ago 105
Python Question

How to setup Atom's script to run Python 3.4 scripts? May the combination with Windows 7 Pro x64 be the issue?

I'm trying to switch from Notepad++ to Atom, but I just can't manage to get my scripts executed in Atom.

I followed this answer (so I already installed script) which is not really extensive and also the rest on the web doesn't offer anything comprehensible for beginners.

In Notepad++ NPPexec I used to

C:\Python34\python.exe -u "$(FULL_CURRENT_PATH)"

and in Sublime Text 2 I made it run by creating a new "Build System":

"cmd": ["C:\\python34\\python.exe", "-u", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"

Can you please guide me how to setup Atom to be able to execute Python scripts with Python 3.4 scripts with a keyboard short-cut?

I already tried to set my init-script to:

process.env.path = ["C:\Python34\python.exe",process.env.PATH].join(";")


process.env.path = ["C:\Python34",process.env.PATH].join(";")

with no success.

When I go to Packages -> Script -> Configure Script and type


it works. But thats not a permanent solution.

When I press Ctrl+Shift+B to run a script, without configuring it before (as it is supposed to work), I get (suggestion of ig0774's comment implemented):

enter image description here

(it doesn't matter whether it is

It complains that python is not in my path - but it is.

I read multiple times that Windows 7/8 64bit together with Python 3.x could cause issues with certain packages. May this be the reason in ths case as well? I have Windows 7 Pro x64.

Answer Source

Setting the PATH within Atom did not work, setting it with the cmd, via

set PATH=%PATH%;C:\Python34

neither, and setting it in the Windows 7 system properties failed as well.

However reinstalling Python 3.4 and check Add python.exe to Path

enter image description here

seems to be neccesary. Also I needed to uninstall Atom completely (inculding all packages or a least script) and reinstall it from scratch.

After all these steps:

  • Install Python with Add to Path
  • Install Atom
  • Install script package

it works out of the box (Ctrl+Shift+B) and no further steps are required.

I still don't know what was the reason before and I don't know which of this steps are really required. So feel free to include your procedure without reinstalling everything.


Reinstalling everything is certainly not necessary, simply updating/repairing the installation with the installer is sufficient.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download