Problem arises during installation of pytorch on the windows

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117

this code shows an installation error while running it on the anaconda prompt.

It seems you are trying to run the pip command in a Python script instead of your terminal, so try to execute it directly in your Anaconda Prompt instead of in a Python REPL.

Thank, my query has got resolved