Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8076691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:19:00+00:00 2026-06-05T15:19:00+00:00

I am running python 2.7, I can run a program fine when I open

  • 0

I am running python 2.7, I can run a program fine when I open the *.py file.

But when I go to cmd and type “python *.py any other args“, it doesn’t work, it says that python is not recognised. This is hard because I am trying to do things like sys.argv[], any help is great.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T15:19:02+00:00Added an answer on June 5, 2026 at 3:19 pm

    You probably don’t have the Python executable on your PATH. The PATH variable tells the command interpreter where to find the commands you are issuing.

    If you are on a Unix/Linux system try

    /usr/bin/python
    

    Under Windows it may vary, so find where Python (python.exe specifically) was installed and specify that complete path to get the command to run. I think this will work though:

    c:\Python27\python.exe

    Under Unix issue this command at the prompt:

    /usr/bin/python myprog.py  arg1 arg2
    

    Under Windows:

    c:\Python27\python.exe myprog.py arg1 arg2
    

    and it should run.

    The long term solution is to add the Python directory to your PATH variable.

    Since you are using Windows, this How to add python.exe to Windows PATH might be helpful. Or this page specifically for Windows 7.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to find any information about what a Python program running right
How can we detect when threads are running in a python application? Motivation: We
Is there any way to get the effect of running python -u from within
When running a Python program that reads from stdin, I get the following error:
Can anyone please tell me an IDE for running python programs? Is it possible
I'm trying to make a connection via ODBC from a Python program running on
I am trying to run a Python program using PHP. Here's the code $command
I have 2 python servers running independently of one another but sharing the same
I have a python program running very well. It connects to several websites and
So, I want to run a Python program with a home-directory install of PyProj

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.