Unable to import packages when python nohup runs on the server, and can't suspend running in the background
edited a file test_nohup.py:
import numpy as npimport foliuma = np.array([[1,2],[3,4]])print(a)code>
Run:
Without nohup, python3 test_nohup.py
[[1 2]
[3 4]]
2. Add nohup, nohup python3 test_nohup.py > file.log 2>&1 &
nohup: ignoring input
Traceback (most recent call last):
File "test_nohup.py", line 2,in
import folium
ModuleNotFoundError: No module named 'folium'
I installed the folium library, but nohup doesn't work, what's the problem?