[英]"ModuleNotFoundError: No module named 'kucoin'" but I have it installed and also tried reinstalling but same result. Running python 3.8.10
import json
import os
import threading
from kucoin.client import Client
api_key = ""
api_secret = ""
passphrase = ""
client = Client(api_key, api_secret, passphrase)
def printit():
threading.Timer(5.0, printit).start()
pull = client.get_tick()
cointType = pull[0]['coinType']
print(coinType)
printit()
It says: " File "...", line 4, in from kucoin.client import Client ModuleNotFoundError: No module named 'kucoin' "它说:“文件“...”,第 4 行,从 kucoin.client 导入客户端 ModuleNotFoundError:没有名为“kucoin”的模块“
you are using relative import, please check out the directory structure.您正在使用相对导入,请查看目录结构。 i suggest you to use absolute import, before running your script, run the command export PYTHONPATH=.我建议您使用绝对导入,在运行脚本之前,运行命令 export PYTHONPATH=。
export PYTHONPATH=.导出 PYTHONPATH=。 python my_module/ main .py python my_module/ main.py
clearly your script can not find the module you are using.显然您的脚本找不到您正在使用的模块。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.