2

I've downloaded Python about a year ago, and back then, I had trouble executing files from the terminal. So, being ye of little faith, I quit trying and forgot most of my Python knowledge. Now, I' revisiting Python, and it still doesn't work (I updated Python. And deleted it. And updated again) But it still does not work. I made sure I'm in the directory that Python is supposedly in. Please help.

3
  • What command did you use? How is it not working. Commented Mar 22, 2018 at 23:42
  • 1
    what operating system are you using? how did you install python? Commented Mar 22, 2018 at 23:42
  • I used the command "python" because that's what everyone uses to execute .py files. I'm using Windows, and I installed it from the python.org website. Commented Mar 22, 2018 at 23:48

2 Answers 2

4

Make sure you already configure python's directory path in system settings. For windows :

Computer properties > Advanced System Settings > Environment Variables > Set your path

You should see something like this:

enter image description here

If you don't see python in the Environment Variables, just:

  1. Click New
  2. Then click "Browse"
  3. Navigate the menu until you find the Python directory
  4. Select it and click Ok

Close all the windows and restart whatever applications you wanted to be aware of the python path.

Additionally, if you're already in an elevated command prompt you can set the path using the command prompt as you can read about in this other StackOverflow post.

Sign up to request clarification or add additional context in comments.

Comments

1

Even easier,

launch again the setup of Python and click on 'Modify'. In the "Advanced Options", check "Add Python to environment variables"

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.