PyTorch works in Mac terminal but not visual studio code

I downloaded PyTorch with pip in two Conda environments and one base environment but PyTorch only works in my Mac terminal and not in visual studio code. How will I be able to get PyTorch working in visual studio code?

I guess your Visual Studio might be using the wrong Python environment.
These docs might help.

How might I be able to change my python environment then.

I figured out how to get it working in vs code by changing my interpreter path thank you.