程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Nohup run a python program cannot guide package

編輯:Python

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?


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved