![](/img/trans.png)
[英]How to run a python script with imports when usb plugged into Linux machine?
[英]How to run a python script from linux terminal when it imports libraries like shodan?
root@kali:~# ./collecting_info_using_facets.py apache
Traceback (most recent call last):
File "./collecting_info_using_facets.py", line 3, in <module>
import shodan
ImportError: No module named shodan
我將路徑包括為#!usr/bin/env
python,但是我也不能從命令行導入shodan,但是我可以從python3 IDLE運行相同的程序。
這是因為您需要下載名為“ Shodan”的Python模塊。 您似乎沒有安裝它,這就是Python返回錯誤的原因: ImportError: No module named shodan
您可以通過以下方式安裝Shodan for Python3:
pip3 install shodan
或者,如果您正在運行Python2,請嘗試:
pip2.7 install shodan
祝你好運。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.