Problem Description:
Prior to use screen, you can operate normally.
After using the screen, appears Error:
ModuleNotFoundError: No module named 'torch'
Cause Analysis:
Which python input window after the screen, the following results were obtained:
(spadn) XXX@gpu01:~XXX/DeblurGAN-master/OneNet$ which python
/home/XXX/anaconda3/envs/tfdpdnn/bin/python
Visible, clearly should be the environment in spadn, it has entered the tfdpdnn environment. tfdpdnn is installed tensorflow, so there is no pytorch module.
Solution:
Method 1 (Comparative stupid):
The python files in that environment you want to use (this article is spadn) (name generally python3.6) into a rather strange name, and not a Python file under the same name tfdpdnn environment. For example, instead pyth0n, run the program also run the command line:
pyth0n main.py
It can be.
While it's certainly possible to run properly, but that if the input nvidia-smi, will appear the following results:
So stupid so stupid
Method 2
No better way, many ways the Internet is also invalid. to be continued.