A
A
amogus222077772021-11-02 10:15:41
Python
amogus22207777, 2021-11-02 10:15:41

Error in main.py file?

I want to create a bot on buttons like verification and the following error pops up:

Traceback (most recent call last):
  File "main.py", line 8, in <module>
    from dislash import InteractionClient, ActionRow, Button, ButtonStyle
ModuleNotFoundError: No module named 'dislash'

wrotepip install dislash

File "<stdin>", line 1
    pip install dislash
        ^
SyntaxError: invalid syntax

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vasily Bannikov, 2021-11-02
@vabka

pip install must be written in the console to install packages, not in a code file.

W
WhiteColor75, 2021-11-02
@WhiteColor75

You may not have installed this library! As I understood from the comment above, you cannot install other libraries in this way!
PS the pip command is a console utility and is installed when you install python by adding itself to the Path variable (separate from python.exe )

U
UMFUCHI, 2021-11-02
@UMFUCHI

As the guys said earlier, you simply did not install the library data
Write in the console (I give an example with PyCharm) pip install Library Name

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question