我收到帶有 Google Cloud Compute 啟動腳本的 ImportError。我相信權限和/或 SSH 有問題。我的程序在 SSH 控制臺上運行良好。在啟動腳本中,它得到一個導入錯誤。我試過放置完整路徑、部分路徑等。這是調試輸出。我的啟動腳本是cd,然后是python path/to/file.py。Ubuntu 1604 xenial v20190212。startup-script: INFO Starting startup scripts.startup-script: INFO Found startup-script in metadata.startup-script: INFO startup-script: Traceback (most recent call last):startup-script: INFO startup-script: File "Project/analyzePDFs.py", line 6, in <module>startup-script: INFO startup-script: from _mongoWrite import w_db, r_db, f_dbstartup-script: INFO startup-script: File "/home/davidxmkong/Project/_mongoWrite.py", line 1, in <module>startup-script: INFO startup-script: from pymongo import MongoClient, UpdateOne, InsertOnestartup-script: INFO startup-script: ImportError: No module named pymongostartup-script: INFO startup-script: Return code 1.startup-script: INFO Finished running startup scripts.
帶有 Google Cloud Compute 啟動腳本的 ImportError
慕工程0101907
2022-06-14 17:10:44