简体   繁体   English

“ModuleNotFoundError:没有名为 'kucoin' 的模块”,但我已经安装了它,还尝试重新安装,但结果相同。 运行 python 3.8.10

[英]"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.

相关问题 ModuleNotFoundError: 没有名为“unidecode”的模块,但我已经安装了该模块 - ModuleNotFoundError: No module named 'unidecode' yet I have the module installed Python:我尝试使用 tabula:ModuleNotFoundError:没有名为“tabula”的模块 - Python: I tried to use tabula: ModuleNotFoundError: No module named 'tabula' ModuleNotFoundError:没有名为“加密”的模块。 我已经安装了加密但仍然是同样的错误 - ModuleNotFoundError: No module named 'Crypto'. I have installed crypto but still the same error ModuleNotFoundError:没有名为“pandas”的模块 - 当我已经安装了熊猫时 - ModuleNotFoundError: No module named 'pandas' - when I have pandas already installed ModuleNotFoundError:安装后没有名为“pgzrun”的模块? - ModuleNotFoundError: No module named 'pgzrun' when I have it installed? ModuleNotFoundError:没有名为“magenta.protobuf”的模块,但我已经安装了它 - ModuleNotFoundError: No module named 'magenta.protobuf' but I have installed it 收到错误 ModuleNotFoundError: No module named 'mysql' 当我安装它时 - getting error ModuleNotFoundError: No module named 'mysql' when i have installed it ModuleNotFoundError:即使我在 conda/python 中安装了它,也没有名为“statsmodels”的模块 - ModuleNotFoundError: No module named 'statsmodels' even after i have installed it in conda/python ModuleNotFoundError:即使我安装了功能工具,也没有名为“功能工具”的模块 - ModuleNotFoundError: No module named 'featuretools' even though I have installed featuretools ModuleNotFoundError: No module named 'mysql' in Python 3.8.10 and Requirement already meet in anaconda location problem是什么原因? - What is the reason of ModuleNotFoundError: No module named 'mysql' in Python 3.8.10 and Requirement already satisfied in anaconda location problem?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM