#πŸ”’ import discord.py not found

36 messages Β· Page 1 of 1 (latest)

agile atlas
#

when I run pip install discord.py I am getting error 'discord.py' is not recognized as an internal or external command, operable program or batch file.

harsh saddleBOT
#

@agile atlas

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

agile atlas
#

pip show discord.py giving the info

#

discord.py --version showing same error

#

python is installed on laptop

terse vector
#

try using py -m pip install discord.py

agile atlas
agile atlas
terse vector
agile atlas
#

oh

terse vector
#

while py-m installs it's specifically for the current interpreter

agile atlas
#

ok

terse vector
#

in which case it solves the module not found issue while a lib is installed

#

now try running the code or importing discord

agile atlas
terse vector
#

use pip freeze

#

and see if discord shows up

agile atlas
#

it's there

#

but why discord.py --version is not showing version?

#

@terse vector

terse vector
agile atlas
#

then how to check it's version

#
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\HP\Remind-Me\remind\__main__.py", line 3, in <module>
    import discord
ModuleNotFoundError: No module named 'discord'```
#

still getting the same error

#

😭

terse vector
terse vector
agile atlas
#

still same error

#

πŸ₯²

#

noob me

edgy fog
#

has this worked before?

#

the error could be that python does not recognise the environment variables, so you will need to add that to path

harsh saddleBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.