简体   繁体   中英

Python Discord Bot, Modul not found error

I'm trying to create a discord bot, but i have basic problem... I have this on start of code:

import discord.py
from discord.ext import commands

Im gettin that error:

PS C:\Users\trnka> & "C:/Program Files/Inkscape/bin/python.exe" c:/Python_projects/Discord_Bots/RCN_bot/RCN.py Traceback (most recent call last): File "c:\Python_projects\Discord_Bots\RCN_bot\RCN.py", line 1, in import discord.py ModuleNotFoundError: No module named 'discord'

But I have installed everything from here , as instalation manual said. Can anyone help me?

import discord

and not discord.py

EDIT: checking the repository page https://github.com/Rapptz/discord.py supported versions are: 3.5, 3.6, 3.7 and 3.8, maybe you need to try on those versions.

Execute the program outside VSCode eg with the Python Program (so python.exe which you hopefully installed (standard is C:/Users/USER/AppData/Local/Programs/Python/PythonVERSION/ )) or PyCharm as VSCode has their own library folder which seems to not include discor.py

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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