0

I have the same old problem of python not being recognized and get this error in VS:

 [Running] python -u "c:\Users\Keram\Desktop\WEB\index.py"
'python' is not recognized as an internal or external command,
operable program or batch file.

the solution is said to be putting the path of the python file where it is installed in the PATH of the environment.

but I had the same issue with node.js and had to put its path as the environment variable path.

now if I add python's path, I would not have node.js.

what am I supposed to ?

asked May 23, 2022 at 7:39
3
  • 1
    Have you tried adding both in the PATH? Can you provide info on your system settings (OS version..)? and how you set the env variable? Commented May 23, 2022 at 7:48
  • 1
    PATH can (and almost always should) contain multiple paths. Colon (:) is used to separate entries (semicolon ; on windows, AFAIR, but not sure here). Commented May 23, 2022 at 7:51
  • thank you guys. the ; allowed me to put multiple paths and now I can use both python and node.js. @SUTerliakov, and arnino Commented May 23, 2022 at 16:34

1 Answer 1

1

You can set path for node and python both, it doesn't affect anything.

Just go to environment variables, click path, edit, and then add the path of python executable file.
Then just restart/reopen the terminal and check.

I had the issue with python where the name was python3 not the python

Renaming solved that issue too.

Hope it helps.!

answered May 23, 2022 at 7:56
Sign up to request clarification or add additional context in comments.

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.