Python Forum
run script from anaconda command prompt - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: run script from anaconda command prompt (/thread-1152.html)



run script from anaconda command prompt - iFunKtion - Dec-08-2016

hi there,

up till now I have been developing on a Raspberry pi and my own Linux box or mac at home, but now I am having to use windows, which I have never used except for the internet. I have emacs running nicely now, but I can't work out how to run a script though? In linux from the terminal it's as simple as ./script.py but I don't know how to do this in windows, all I have managed to do is pull the script up, I can't work out how to actually make it run. What do I have to type in please, assuming that I am in the correct directory.

Apologies, typically just found it, after searching for an hour. You simply have to type 'python' in first. doh

Admins. please feel free to delete this thread.


RE: run script from anaconda command prompt - Larz60+ - Dec-08-2016

Welcome to the world of Microsoft!
Consistency is not one of it's attributes


RE: run script from anaconda command prompt - snippsat - Dec-08-2016

A intro.
Anaconda codes with own promt Anaconda promt it's in start menu.
You can also use cmd(or cmder as i use) an navigate to Anaconda3 folder.
G:\Anaconda3
λ python
Python 3.5.2 |Anaconda 4.2.0 (32-bit)| (default, Jul  5 2016, 11:45:57) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

G:\Anaconda3
λ python foo.py #Running a script

#To Scripts folder
G:\Anaconda3
λ cd Scripts

G:\Anaconda3\Scripts
λ spyder #Start Spyder editor
Anaconda comes with Navigator in start menu.
Spyder is nice editor that's come with Anaconda.
And Jupyter Notebook is cool Cool

If Anaconda is your main Python version.
You should mark this:
Then Path(python commad will work from anywhere in cmd) will be set and editors like Pycharm Free Community will find this version.