0

I am using command prompt to run CUDA on windows. When i open cmd, the current directory is pointed towards home folder. When i type nvcc, output is nvcc : fatal error : No input files specified. It means i can run nvcc with a file. But, when i type python, it shows

'python' is not recognized as an internal or external command,
operable program or batch file.

I need to change my directory to run python. My question is, how to make python run without changing the directory? Is it like inputting cmd about change in the library path as in ubuntu?

1 Answer 1

1

Windows, like Ubuntu, has the concept of a "path", which is a list of directories that the shell will search to try to find the command you typed. Therefore, the nvcc command is probably located in a directory found in your system's path, but the python command is not.

Therefore, you'll need to find where on your system the python command is, and put that command's directory into the path. So, if python is located at C:\Python26\python.exe, you will need to add C:\Python26 into the path.

Superuser has some answers that can describe how to modify the path in windows, or otherwise you can google how to do this. The exact steps may be different depending on the version of Windows that you have.

Additionally, you can also ignore the path and run the python command using the full filename. Instead of typing python, you would type (using the above example) C:\Python26\python. This would have the same effect, although would be a bit more typing.

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

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.