PyCharm尽管已经安装了Discord模块,但不会运行它

问题描述 投票:0回答:1

我是Syder的Pycharm初学者。现在,搬到皮查姆之后出现了新问题。

[也许有人知道,Python适合制作不和谐的机器人。我在终端中使用pip install安装discord软件包,然后开始编写代码。一旦运行它,控制台将返回:ModuleNotFoundError: No module named 'discord'

供参考,这里是代码:


    # Marble Police
    import discord
    from discord.ext import commands

    client = commands.Bot(command_prefix="/")

    @client.event
    async def on_ready():
        print("Marble Police has been dispatched!")

    client.run({BOT TOKEN})

如果您需要其他信息,请在下面询问我。

python pycharm discord
1个回答
0
投票

pip install discord.py

[结帐https://pypi.org/project/discord.py/

© www.soinside.com 2019 - 2024. All rights reserved.