Не устанавливается discord py
Introduction¶
This is the documentation for discord.py, a library for Python to aid in creating applications that utilise the Discord API.
Gorialis commented Mar 19, 2019
Rather than using a generic executable like python or just py , try using one that explicitly tells your system what you're looking for:
ModuleNotFoundError на Python | Исправлено EasyComputerUse
Пытаюсь запустить свой файл .py из CMD, но не может найти модуль Discord
Хотя, когда бегаю:
Работает как задумано, есть предложения?
Зайдите в терминал и используйте: pip uninstall discord.py подождите несколько секунд, чтобы он мог полностью удалить его, а затем используйте pip install discord.py . Должно сработать
- 1 Не могли бы вы добавить примеры полных команд, которые нужно вводить? Это упростит использование ответа.
- Как этот @Joooeey?
- да, намного лучше 🙂 Проблема с обратными кавычками во втором фрагменте кода. Использование одинарных обратных кавычек для заключения code должно сработать.
проверьте расположение интерпретатора python в pycharm. Или установите Discord с помощью команды sudo pip
sudo pip install discord.py решает проблему
Я предполагаю, что ваш venv в pycharm и ваша среда в командной строке имеют разные пакеты. Если ошибка заключается в том, что программа не работает в командной строке, попробуйте открыть командную строку и запустить pip install discord (pip должен быть в вашем PATH), чтобы установить его в ваш основной каталог python. Вы заметите, что в PyCharm, если вы откроете вкладку терминала, он говорит
"(venv)" означает, что здесь загружается виртуальная среда, в которую могут быть установлены пакеты без изменения вашей основной установки на вашем ПК (обычно находится в C: \ Program Files \ Python 3.5). Однако для запуска сценариев из командной строки вам потребуется установить пакет в основной каталог python, который pip install discord выполню.
Я пытаюсь запустить неработающий файл в python 3.8.2. Постоянно появляется ошибка с надписью "Нет модуля с именем ‘discord’". Я пытаюсь создать бота discord, но IDLE, похоже, не может найти модуль под названием discord. Он продолжает выделять оператор import discord в строке 1.
1 ответ
Я думаю, что вы не установили модуль discord. Пожалуйста, установите его с помощью "pip install discord"
Похожие вопросы:
Я пытаюсь импортировать ‘sklearn’, используя Python 3.4.3 на Raspberry Pi 3 под управлением Raspian. Я скачал microconda3, который включает в себя все необходимые модули для использования scikit.
Сейчас я использую aws-glue и хотел бы подключить aws-glue к aws-aurora(Postgres)! Итак, я создал задание aws-glew для подключения aws-glue к aws-aurora(Postgres) с помощью pg8000. Но я получаю.
CapnS commented Mar 19, 2019
The version of the library on pip does not work with python 3.7, you'll either have to downgrade your python or use the rewrite branch of the library.
To install the rewrite version of the library, use this command:
In the future, please don't necro issues, you should join either the official discord.py server or the Discord API server, as the README recommends.
Linux
On Linux, executables like python are just symbolic links to the longer, full executable names. If we need a specific version, we can just use its full name.
If you don't know what versions you have, try checking what executables are on your system using a command like ls -l /usr/bin | grep python . If that doesn't work, using which python will tell you where python leads, and you can try on that folder instead.
The text was updated successfully, but these errors were encountered:
laggycomputer commented Mar 19, 2019
"Модуль" Discord "не найден" в Python3.x во время установки PIP
У меня есть небольшой вопрос: мой босс Discord написан на Python, и я продолжаю получать ошибки. Это код моего бота:
И когда я запускаю его, возникает такая ошибка:
Я действительно не знаю, что делать, все, что я сделал, это следующие команды в CMD:
Все это, я убедился, что модули установлены без ошибок, и они это сделали, все и так, и я знаю, что вам нужны другие "программы", и я установил следующие программы: Python 3.6.3 64x и Python 3.7.0a2 64x
Мой компьютер от 64-битной архитектуры, поэтому он полностью соответствует.
Вполне возможно, что pip устанавливает модуль из чужой директории в версию Python, с которой вы запускаете ваш скрипт. Попробуйте указать версию python, добавив номер версии в команду терминала, например, python3.6 -m pip install discord.py . Если это не сработает, попробуйте использовать pip3 вместо pip .
редактирование: также не пытайтесь установить asyncio , это часть стандартной библиотеки.
twitch0001 commented Mar 19, 2019
Prerequisites¶
JavascriptHero commented Mar 19, 2019
I'm in 100 servers already.
laggycomputer commented Mar 19, 2019
Installing¶
You can get the library directly from PyPI:
If you are using Windows, then the following should be used instead:
To get voice support, you should use discord.py[voice] instead of discord.py , e.g.
On Linux environments, installing voice requires getting the following dependencies:
For a Debian-based system, the following command will get these dependencies:
Remember to check your permissions!
Virtual Environments¶
Sometimes you want to keep libraries from polluting system installs or use a different version of libraries than the ones installed on the system. You might also not have permissions to install libraries system-wide. For this purpose, the standard library as of Python 3.3 comes with a concept called “Virtual Environment”s to help maintain these separate versions.
mross01 commented Mar 20, 2018
having same issue
appuchias commented Feb 14, 2019
I haven´t solved it yet.
The error message is:
import discord
ModuleNotFoundError: No module named 'discord'
I don´t have any Discord called folder and I have 3.7 Python and I have updated pip.
Has anyone an answer?
ArctoranDev commented Mar 19, 2019
Hi, I'm having this issue on Python 3.7. Does this mean I'll need to downgrade?
Установка бота для Discord на Python
ЗЫ
С питоном никогда не работал, для меня этот язык совершенно новый.
Надо написать бота на Python для Asterios Network
Добрый день форумчане! Помогите написать бота на Python для Asterios Network Api Asterios.
Установка Python для пользователя
Изучаю Питон и столкнулся с проблемой устоновки Питон окружения пользователю как вы в своих.
Установка библиотеки dlib для Python 3х
Здравствуйте!:) Прошу Вас помочь мне! Возможно, кто-то из вас сталкивался с такой проблемой. .
Не устанавливается лаунчер установки программы "discord". Помощь на форуме (очистка папок из appdata и localappdata) не помогает, перезагрузка компьютера тоже.
6836> 2017-03-31 01:11:47> Program: Starting install, writing to C:\Users\Глеб\AppData\Local\SquirrelTemp
6836> 2017-03-31 01:11:49> Program: About to install to: C:\Users\Глеб\AppData\Local\Discord
6836> 2017-03-31 01:11:55> SingleGlobalInstance: Grabbing lockfile with timeout of 00:00:10
6836> 2017-03-31 01:11:56> CheckForUpdateImpl: Reading RELEASES file from C:\Users\Глеб\AppData\Local\SquirrelTemp
6836> 2017-03-31 01:11:56> CheckForUpdateImpl: Remote version 0.0.297 differs from local
6836> 2017-03-31 01:11:56> CheckForUpdateImpl: First run or local directory is corrupt, starting from scratch
6836> 2017-03-31 01:12:01> ApplyReleasesImpl: Writing files to app directory: C:\Users\Глеб\AppData\Local\Discord\app-0.0.297
6836> 2017-03-31 01:12:38> ApplyReleasesImpl: Moving file C:\Users\Глеб\AppData\Local\Discord\app-0.0.297\lib\net45\app.ico to C:\Users\Глеб\AppData\Local\Discord\app-0.0.297\app.ico
6836> 2017-03-31 01:12:38> ApplyReleasesImpl: Moving file C:\Users\Глеб\AppData\Local\Discord\app-0.0.297\lib\net45\blink_image_resources_200_percent.pak to C:\Users\Глеб\AppData\Local\Discord\app-0.0.297\blink_image_resources_200_percent.pak
6836> 2017-03-31 01:12:38> ApplyReleasesImpl: Moving file C:\Users\Глеб\AppData\Local\Discord\app-0.0.297\lib\net45\content_resources_200_percent.pak to C:\Users\Глеб\AppData\Local\Discord\app-0.0.297\content_resources_200_percent.pak
6836> 2017-03-31 01:12:38> ApplyReleasesImpl: Moving file C:\Users\Глеб\AppData\Local\Discord\app-0.0.297\lib\net45\content_shell.pak to C:\Users\Глеб\AppData\Local\Discord\app-0.0.297\content_shell.pak
6836> 2017-03-31 01:12:38> ApplyReleasesImpl: Moving file C:\Users\Глеб\AppData\Local\Discord\app-0.0.297\lib\net45\d3dcompiler_4
Иногда программы глючат при использовании не-английских путей к файлам. Сделай другого юзера в Винде (вместо "Глеба"), назови только английскими буквами, и попробуй установить из-под него "для всех пользователей".
Это не очень удобный вариант.
То-есть каждый раз программы нужно будет ставить из под второго пользователя.
Varravann Мыслитель (9255) Не каждый раз, а только для тех кривых программ, чьи инсталляторы рукожопски написаны без учета существования букв, отличных от английских. А вот если поменять имя пользователя, то могут начать сбоить многие уже установленные программы (которые внутри себя прописали пути с учетом существующего имени пользователя). Плюс, и сам пользователь может не хотеть менять имя.
Извини, но вся проблема в том что программа не может перенести файлы в директорию установки: C:\Users\Глеб\AppData\Local\Discord\app-0.0.297
Это вызвано тем что имя твоего пользователя: C:\Users\Глеб
То-есть он на русском, в этом и вся проблема.
when i install discord.py in my pc i have this error:
Microsoft Windows [Versione 10.0.17134.1]
(c) 2018 Microsoft Corporation. Tutti i diritti sono riservati.
C:\Users\admin>python --version
Python 2.7.15
C:\Users\admin>pip --version
pip 10.0.1 from c:\python27\lib\site-packages\pip (python 2.7)
what did i do wrong?
The text was updated successfully, but these errors were encountered:
twitch0001 commented Mar 19, 2019
EvieePy commented Feb 14, 2019
I'm going to try and cover most of this here so that this stops being necro'd.
Firstly for those running PyCharm, beware that it is default behaviour for it to create a virtual environment in your project.
To avoid any issues simply run your pip commands in the PyCharm terminal, located on the bottom left. This should ensure your packages are being installed to the venv. If you do not want to use the venv, you can simply select a System Interpreter: File > Settings > Project > Project Interpreter > Little Cog (Top Right) > Add > System Interpreter.
Secondly, ensure you are not creating any files or folders named discord in your project. If you have any in your project, remove them, and try again.
Thirdly, ensure you are installing discord.py to the correct place.
On Linux/Mac:
python -m pip install discord.py
For example:
python3.7 -m pip install discord.py
On Windows:
py - -m pip install discord.py
For Example:
py -3.7 -m pip install discord.py
Lastly remember, if you install a package to Python version 3.7(and you want to use it). You must run your bot under Python 3.7.
For example:
python3.7 my_bot_file.py
If you are unsure if your version of Python has an installed package, you can use, for example:
python3.7 -m pip show package_name or python3.7 -m pip freeze (to show all installed packages).
ArctoranDev commented Mar 19, 2019
Apparently it doesn't work on 3.6 either because I just installed that and same problem.
2 ответа
Как сказано в описании "discord", это зеркальный пакет.
На мой взгляд, хотя предполагалось установить discord.py, он не установился. Когда вы загружаете библиотеку через pip, вы должны писать pip install discord.py вместо pip install discord . После загрузки discord.py вы сможете выполнять import discord .
А также убедитесь, что ваша версия python — Python 3.5.3 или выше .
CapnS commented Mar 19, 2019
Please join the official discord.py server using the link I sent above to get more help.
Zomatree commented Mar 19, 2019
@JavascriptHero it does work, confirmed by me and about 5K people
FelixEcker commented May 9, 2018
You need at least Python 3.4 to use Discord.py as mentioned in the readme
twitch0001 commented Mar 19, 2019 •
Sir i would like to point out that you are incorrect, both versions of discord.py are compatible with python 3.6 @JavascriptHero if you would like support join the discord.py server
edit:
never call yourself the python hero
JavascriptHero commented Mar 19, 2019
I'm having the same issue. This library does NOT work on Python 3.6, confirmed by me.
JavascriptHero commented Mar 19, 2019
simdimdim commented Jul 22, 2017
@ccubed very helpful, that was exactly the case with my pythonic 'project', thanks for the headsup.
ccubed commented Dec 18, 2016
You both likely have a folder named discord in your project folder. Delete it. Rerun the command. This is probably a case of local overrides. To verify, move out of your project directory entirely and run the following commands:
If this works with no errors, you have a local override in your project. Delete the discord folders in there.
ghost commented May 11, 2017
Sorry to necro this, but I'm getting the same issue. When I run python3 , then import discord , I get no errors (or text in my cmd window), but I definitely don't have any directories named discord in there. Some of my package names include the string "discord", but none are just the word so it shouldn't have an issue, right?
sgtlaggy commented Dec 18, 2016 •
python3 -m pip install discord.py
Windows
Windows installs of Python come with the py launcher by default, which allows you to specify the version you're looking to execute a script or module on.
If you don't know what versions you have, newer versions of the py launcher allow you to type py -0 to see your full version list.
JavascriptHero commented Mar 19, 2019
@Elxafil Were you able to resolve it on your 3.6 installation?
2 ответа
Как сказано в описании "discord", это зеркальный пакет.
На мой взгляд, хотя предполагалось установить discord.py, он не установился. Когда вы загружаете библиотеку через pip, вы должны писать pip install discord.py вместо pip install discord . После загрузки discord.py вы сможете выполнять import discord .
А также убедитесь, что ваша версия python — Python 3.5.3 или выше .
Читайте также: