For Anaconda/Jupyter Notebook:
Firstly go to your Anaconda Prompt.
Then activate your environment (or skip this if you want to do it in base)
pip3 install ipykernel --upgrade
Then put this code.
python -m ipykernel install --user --name torch --display-name "PyTorch (base)"
Here, torch = name of your virtual env (put anaconda-base for the base environment)
PyTorch (base) = display name you want to show in the kernel; replace it with your wish.
Then you will see the option to change the kernel (From Kernel Option) to your virtual environment you are looking for.
Before, not working state:

After, working state:

And if it is in VS Code, please check this answer. This solves it perfectly.
https://stackoverflow.com/a/64730974/9848043
python --versionand show us the output. What I'm thinking is that you have two versions of python running on your machine. The terminal is running one and atom is running the other version.python --versionPython 3.6.5 :: Anaconda custom (x86_64). @amb1s1 this is what I get.import platformplatform.python_version()Let see what version Atom is using.