Python Forum
run script from anaconda command prompt
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
run script from anaconda command prompt
#1
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.
Reply
#2
Welcome to the world of Microsoft!
Consistency is not one of it's attributes
Reply
#3
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Is possible to run the python command to call python script on linux? cuten222 6 633 Jan-30-2024, 09:05 PM
Last Post: DeaD_EyE
  What is the difference between Command Prompt and Sublimes yaoyao22 1 588 Jul-09-2023, 02:56 PM
Last Post: snippsat
  Facing Problem while opening a file through command prompt vlearner 4 1,857 Jan-30-2022, 08:10 AM
Last Post: snippsat
  Anaconda pip install mpyc Error pip-script.py is not present Anldra12 2 7,719 Dec-13-2021, 06:59 PM
Last Post: Anldra12
  Automatic user/password entry on prompt by bash script PBOX_XS4_2001 3 2,727 May-18-2021, 06:42 PM
Last Post: Skaperen
  Run CMD Command In Python Script shantanu97 2 6,465 May-13-2021, 08:08 AM
Last Post: Gribouillis
  Noob warning: trying to use pip to install pytest and pep8 in Command Prompt adifrank 4 5,230 Dec-20-2020, 04:23 AM
Last Post: adifrank
  Running Python in Command Prompt Anwar 3 3,002 Nov-15-2020, 03:15 PM
Last Post: snippsat
  starting python from windows command prompt MaartenRo 4 2,746 Sep-04-2020, 12:25 PM
Last Post: MaartenRo
  Running script from Anaconda prompt acollins555 0 2,554 Jun-15-2020, 03:40 AM
Last Post: acollins555

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020