无法解析导入“电报”(在macos上)

x6yk4ghg  于 2021-09-08  发布在  Java
关注(0)|答案(0)|浏览(162)

我尝试在macos上安装pyhon电报机器人。

python -i
Python 2.7.10 (default, Oct 23 2015, 19:19:21) 
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

但是,即使终端说我已经成功安装了ptb,我还是收到了一个导入错误。

Import "telegram" could not be resolved Pylance(reportMissingImports)

此外,在检查已安装版本时,还显示未找到任何模块:

/usr/bin/python: No module named telegram

我使用了正确的命令:

pip3 install python-telegram-bot

老实说,我已经没有主意了。在我的windows电脑上(在家里)一切正常。i ptb仅在windows计算机上工作?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题