atom-script icon indicating copy to clipboard operation
atom-script copied to clipboard

Getting Python to run on Windows 10

Open BramVanroy opened this issue 11 years ago • 18 comments

I am using Atom (1.0.4) on Windows 10. I have a couple of Python packages installed, seeing as I'm new to Python and still learning.

  • autocomplete-python
  • linter-flake8
  • script
  • language-python (core)

I installed Python here: C:\Users\bramv\AppData\Local\Programs\Python\Python35\python.exe (default). I put this path in the settings of autocomplete-python, which requires the path to Python. However, when I try to execute a script with ctrl+shift+b, I get the following error:

Unable to run

python
Is it in your PATH?

PATH: C:\Users\bramv\AppData\Local\Programs\Python\Python35;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Skype\Phone\;C:\Users\bramv\AppData\Local\atom\bin;/usr/local/bin;/usr/bin;/bin;/usr/sbin;/sbin

I also get this error when I launch atom from command prompt with start atom.

As I said, I'm quite new to Python so maybe there's something with my code, but for now even trying to print a string doesn't work, for instance print "I like bananas".

BramVanroy avatar Aug 06 '15 15:08 BramVanroy

I have the same issue with windows 7.

There was no issue two days ago.

yuxiangguTemp avatar Aug 10 '15 14:08 yuxiangguTemp

@yuxianggu Do you have any of the packages installed that I mentioned? I ask so because then maybe it's easier to debug.

BramVanroy avatar Aug 10 '15 15:08 BramVanroy

@BramVanroy
Thanks for the prompt reply.

A bit more information about the bug. Basically I cannot run anything, not just python. e.g. "Unable to run node" when trying to run a js file.

I just reinstalled Atom with only 'script' installed and the problem was still there.

And then I installed "atom-terminal" and everything can be called.

Hopefully the above information can give you some idea of debugging. Thanks.

yuxiangguTemp avatar Aug 10 '15 17:08 yuxiangguTemp

I can confirm that installing atom-terminal solves this issue. I have been looking for a "why" but I can't find it. Any help is appreciated.

EDIT: when atom-terminal is installed, you also don't need to run Atom from the command line. It will work even if you launch it from a desktop icon.

BramVanroy avatar Aug 11 '15 20:08 BramVanroy

That's probably because atom-terminal uses the fix-path package. I was against using it since it would make virtualenvs not work (it overrides the PATH).

rgbkrk avatar Aug 20 '15 14:08 rgbkrk

I am on Win 10 as well though atom-script is still unable to find python path even after trying atom-terminal and fix-path (separately). Any thoughts?

cwmat avatar Sep 12 '15 18:09 cwmat

Maybe this happened because you installed python without check the option ADD PYTHON X.X TO PATH... I had problems with that when running python for the first time. Did you check this option when installing python?

RicaBenhossi avatar Oct 19 '15 23:10 RicaBenhossi

I have this problem and Python34 (and the Script folder too), NodeJs, Atom are in my path. All solution that I found was to add into the path variable, but nothing this fix this error.

oxechicao avatar Oct 27 '15 15:10 oxechicao

humm, i tried everything and currently not working, i am on win 8.1 anaconda. etc. quite interestingly. next pc is same, win 8.1 and install atom and it just works with script run................this is strange

lalamax3d avatar Nov 05 '15 10:11 lalamax3d

@lalamax3d Compare the PATH variable of both systems. Are they the same, or at least similar?

BramVanroy avatar Nov 06 '15 10:11 BramVanroy

yes path variablewere same, quite interestingly. i removed almost all of extension packages and then install atom-terminal. restart 2-3 times and it started working in first pc. ..........thanks again..

lalamax3d avatar Nov 06 '15 11:11 lalamax3d

Try doing what it says here: http://cardiffmathematicscodeclub.github.io/blog/2015/10/03/adding-python-to-the-path-windows.html. This was written by a friend of mine who solved this for Windows machines

AdamPohl avatar Nov 19 '15 07:11 AdamPohl

I had the same problem: Atom, Windows 10, Python, Script, and the error "Is it in your PATH?". Installing the terminal-package did not have any effect.

I managed to fix the problem by running Atom in developer mode (View -> Developer -> Open in dev mode), hopefully it fixes it for you too.

Asjenw avatar Dec 05 '15 09:12 Asjenw

@Asjenw Thanks! It works

michael3lyb avatar Feb 01 '16 11:02 michael3lyb

@Asjenw thanks~ you slove my question

sss121343sss avatar Feb 04 '16 12:02 sss121343sss

@Asjenw thanks!

g-lyc avatar Feb 23 '16 14:02 g-lyc

@Asjenw it works. Thanks!

Kugl avatar Feb 24 '16 20:02 Kugl

On my Windows7, I found it easy and straight and i hope this might help you. In Python Executable Path type C:\Python27\python.exe

techdiary avatar Mar 13 '16 18:03 techdiary