![](/img/trans.png)
[英]Can't open lib 'SQL Server Native Client 11.0' when running python3 file in Ubuntu VM
[英]Error when running Python3 command in Ubuntu server?
我正在嘗試使用命令($ python3 es7.py)在 Ubuntu 服務器中運行 python 命令。 但是得到了錯誤(ModuleNotFoundError: No module named 'confluent_kafka')。
我的 es7.py 腳本
from confluent_kafka import Producer
import json
import requests
import time
p = Producer({"bootstrap_servers": "localhost:9092"})
while True:
response1 = requests.get("http://api.openweathermap.org/data/2.5/weather?q=jaipur&appid=**")
p.produce('weather', key='jaipur', value=response1.text)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.