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

后端 未结 9 521
滥情空心
滥情空心 2020-12-01 09:37

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 scr

相关标签:
9条回答
  • 2020-12-01 10:37

    Following up on Matt Nona's advice , when Atom starts-> Welcome Guide (or control+shift+T)-> 5th one down 'Hack on the Init Script'. A blank page will open and you can add that modifications in there.

    0 讨论(0)
  • 2020-12-01 10:37

    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

    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.


    Update

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

    0 讨论(0)
  • 2020-12-01 10:39

    For Linux and Mac, adding environment in the script will pick correct python version. (command + I to run)

    for running with python3

    #!/usr/bin/env python3
    
    0 讨论(0)
提交回复
热议问题