简体   繁体   English

我无法导入或使用 tdclient 库

[英]I couldn't import or use tdclient library

I got an error with this code:我收到此代码错误:

from td.client import TDClient

Error message:错误信息:

ModuleNotFoundError: No module named 'tdclient' 

and I installed tdclient through the command line:我通过命令行安装了tdclient

pip install td-client

and it was successfully installed.并成功安装。

If you are using virtual environments (venv), ensure you installed the module in the right venv.如果您使用的是虚拟环境 (venv),请确保将模块安装在正确的 venv 中。

If you are indeed using the right virtual env, or you're not using virtual environments at all, there may be a typo in the import statement.如果您确实使用了正确的虚拟环境,或者您根本没有使用虚拟环境,则导入语句中可能存在拼写错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM