0

On my PC at work which has Windows 10, I've installed Python. However when I'm trying to call from the command prompt, I get the following result (Picture 1) and I have to manually enter the path to open python (Picture 2). In order to be able to install all the libraries, what should I do in ordert to be able to directly call python as in Picture 1? I tried to add the path to the user environment as in Picture 3, as suggest below but, I still get the exact same error message as in Picture 1

Picture 1

enter image description here

Picture 2

enter image description here

Picture 3 enter image description here

asked Feb 28, 2019 at 9:03
4
  • 1
    add the python path to your environment variables Commented Feb 28, 2019 at 9:04
  • Add python path and Scripts path to System variable by just search system variable (Enviornment) and go to advance and add complete path to path section Commented Feb 28, 2019 at 9:05
  • read: geek-university.com/python/add-python-to-the-windows-path Commented Feb 28, 2019 at 9:06
  • If you installed the py.exe launcher for all users, just run py, or py -3.7 to be precise. To install packages, run py -m pip install <...>. You can add the installation and scripts directories to PATH if you really need a particular python.exe and pip.exe, but it becomes a maintenance chore when upgrading to a new major version, or if you need to switch between versions. Commonly in development it's better to create and activate a virtual environment, e.g. py -m venv env37 and then env37\Scripts\activate.bat. Commented Feb 28, 2019 at 9:28

2 Answers 2

1
answered Feb 28, 2019 at 9:08
Sign up to request clarification or add additional context in comments.

2 Comments

Thank you for your answer @Ibrahim. I tried your answer and uploaded the screenshot of the implementation but it still doesn't work. what am I missing?
Hi, add your python path inside the variable "Path". ( In your screenshot picture3, below the selected OneDrive variable. click the Path variable then add python path inside it) Then you must close and open the terminal.
0

I too faced this issue when i'm new to python. So, I suggest you to re-install the python while installing there will be option to add '.exe' file to the path then you can directly call python interpreter in your command prompt.

answered Feb 28, 2019 at 9:31

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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.