Pip install discord py не работает
The text was updated successfully, but these errors were encountered:
sgtlaggy commented Dec 18, 2016 •
python3 -m pip install discord.py
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?
simdimdim commented Jul 22, 2017
@ccubed very helpful, that was exactly the case with my pythonic 'project', thanks for the headsup.
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?
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).
Качаю Python, захожу в консоль, пишу pip install и выдает что "pip" не является внутренней или внешней командой, исполняемой программой или пакетным файлом. Что делать?
Простой 1 комментарий
Добавить в PATH.
Гугли переменные среды
Или даже будет быстрее переустановить питон и при установке поставить соответствующую галочку.
Скорее всего, у вас просто не была установлена галочка на работу пипа со всех директорий, или переустановите пайтон, почтавив эту галочку, илм пробуйте выполнять эту команду с директории где находится пайтон
Если винда, то тут 99% что при установке не поставил галочку добавить пути в PATH.
1. Руками прописать
2. Удалить и поставить заново, не пропустив галочку
Нужно обновить pip:
python -m pip install --upgrade pip
Скорее всего вы используете Python 3.9. Но многие мейнтейнеры не успели обновить пакеты. Поэтому установите Python 3.8
Discord.py поддерживается пока питоном 3.5 . 3.8!
И неплохо бы установить Microsoft C++ Build Tools, пригодится для установки некоторых пакетов.
Requirement already up-to-date: pip in c:\users\. \appdata\local\programs\python\python39\lib\site-packages (20.2.4)
если галочка PATH python не сработала можно: настроить ручную.
здесь объясняют как в ручную настроить PATH для python (для pip достаточно просто указать в PATH адрес к scripts в каталоге python)
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:
FelixEcker commented May 9, 2018
You need at least Python 3.4 to use Discord.py as mentioned in the readme
ArctoranDev commented Mar 19, 2019
Hi, I'm having this issue on Python 3.7. Does this mean I'll need to downgrade?
laggycomputer commented Mar 19, 2019
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.
ArctoranDev commented Mar 19, 2019
Apparently it doesn't work on 3.6 either because I just installed that and same problem.
CapnS commented Mar 19, 2019
Please join the official discord.py server using the link I sent above to get more help.
JavascriptHero commented Mar 19, 2019
I'm having the same issue. This library does NOT work on Python 3.6, confirmed by me.
laggycomputer commented Mar 19, 2019
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
Zomatree commented Mar 19, 2019
@JavascriptHero it does work, confirmed by me and about 5K people
JavascriptHero commented Mar 19, 2019
@Elxafil Were you able to resolve it on your 3.6 installation?
twitch0001 commented Mar 19, 2019
JavascriptHero commented Mar 19, 2019
I'm in 100 servers already.
JavascriptHero commented Mar 19, 2019
twitch0001 commented Mar 19, 2019
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:
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.
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.
Running python3 -m pip install -U discord.py as directed returns /usr/local/bin/python3: No module named pip .
I also tried $ pip install -U discord.py , here is the pip.log:
Oh, and I have Python 3.5.2.
The text was updated successfully, but these errors were encountered:
ghost commented Sep 16, 2016
ccubed commented Sep 16, 2016
Your python was compiled without ssl. Have fun.
ghost commented Sep 16, 2016 •
@ccubed What do you mean by that? Also, that was very rude.
Rapptz commented Sep 17, 2016
@dan9er This isn't really the place to learn how to get pip or compile Python properly.
See this question for help on your missing packages in a debian-like and then recompile python and run ensurepip again.
ghost commented Dec 11, 2016 •
Can someone please reopen this, because I got an issue running @Rapptz's code:
$ python3 -m ensurepip --upgrade
/usr/bin/python3: No module named ensurepip
Fuyukai commented Dec 11, 2016
ghost commented Dec 11, 2016
adongy commented Dec 11, 2016 •
replacing system pip may not be the smartest idea, but if you really want to do it, try sudo after the pipe instead of sudoing the curl
ghost commented Dec 11, 2016
@adongy Again, my pip and ensurepip doen't seem to exist. And what do you mean by "pipe"?
ccubed commented Dec 11, 2016
The problem you have is that you ran curl as sudo and then as non sudo. So one of these ran as Root and one did not. Python did not have permission to write to those directories. So if you want to use sudo, you need to put sudo both before curl and before python3. Otherwise don't use sudo at all. You'd be better off not using sudo on curl and instead putting the sudo before python3.
ghost commented Dec 11, 2016
But again, ensurepip says itself doesn't exist.
ccubed commented Dec 11, 2016
Looks to me like everything installed fine. So.
ghost commented Feb 25, 2017
After all of this, I believe that installing discord.py on Ubuntu is impossible. If anyone knows someone who managed to do this, please let me know and how they did it.
Rapptz commented Feb 25, 2017
Just do python3 -m pip install discord.py mate
Aareon commented Feb 28, 2017
Without mate . You can install discord.py on Ubuntu just as easily, if not easier, on Ubuntu than on nearly any other OS if you have patience and think about what you're doing before randomly and/or inconsistently using sudo whilst setting up your dependencies.
My best suggestion would be to clean install everything that you must. Preferably avoiding sudo as much as possible. Then report back in a new issue if your problem persists.
NotShin commented Feb 13, 2018
apt-get install python3-pip
Harmon758 commented Jan 16, 2019
You can pip show discord.py to see if it's installed.
Or you can just try and use the library.
Please don't necrobump closed issues.
For further help, you should join either the official discord.py server or the Discord API server, as the README recommends.
lDumBot commented Jan 16, 2019 •
You can pip show discord.py to see if it's installed.
Or you can just try and use the library.Please don't necrobump closed issues.
For further help, you should join either the official discord.py server or the Discord API server, as the README recommends.
thank,sorry for delete the other post because i test using import but i go check using this other form just to make sure it's all right and I'm already in the discord.py server thank for invitation.
DarkestValkryie commented Aug 12, 2019
Gorialis commented Aug 12, 2019
Please don't necrobump closed issues.
DarkestValkryie commented Aug 12, 2019
but if there is still a problem then the matter is not closed.
Gorialis commented Aug 12, 2019
There is not a problem - the issue is closed, as is indicated by GitHub with the issue title, and the closure in the timeline. Do not necrobump closed issues - this will be the last time I will tell you this.
SyntaxError: invalid syntax
пишу в cmd, путь в PATH прописан(как и в переменные среды пользователя так и в системных переменных). Помогите пожалуйста!
Не работает команда pip
Здравствуйте. Установил я питон на свой компьютер (Версия python 3.8.1). И все было хорошо до того.
Не работает pip
Дароу коллеги, сегодня столкнулся с такой проблемой, что не могу установить библиотеку через pip3.
Не работает Pip
Установил python 3.5.1 с офф. сайта. Ессно, pip установился с ним в комплекте. Но ни в IDLE, ни в.
Не работает PIP
Добрый день! Подскажите пожалуйста, я только-только начал изучать программу Python и решил.
как говорится, пока сам не начнёшь разбираться.
в общем если вам пишет invalid syntax, то проверьте PATH. если не помогло, то у вас скорее всего не утановлен сам установщик библиотек pip. ищите в папку scripts там где утанвлен python, в этой папке надите файл pip, установите его и должно всё заработать.
Неверно. SyntaxError: invalid syntax это ошибка интерпретатора. К PATH никакого отношения не имеет.
Ваша ошибка - вы вводите команду не там, где нужно.
Добавлено через 1 минуту
ищите в папку scripts там где установлен python, в этой папке найдите файл pip, установите его и должно всё заработать.
ну как так, "ты пишешь не в cmd" а комбинация вин+R и последующее написание в открывшимся окне "cmd" и нажатие enter что открывает? "если pip там есть, то ничего устанавливать не нужно" - как же мне тогда это помогло? то есть пока я не открыл файл pip, у меня на команду pip install "какая то библиотека" был ответ invalid syntax, то после у меня заработала команда pip и я смог устанавливать интересующие меня библиотеки. чудеса. но я, все равно, все не правильно делаю и пишу не cmd)))
Как же тяжело учить нубов.
После того как ты открыл cmd, ты должен ввести команду pip install модуль сразу же. А не после того, как написал команду python. Потому что команда python запускает интерактивный режим интерпретатора Python. И теперь все что ты пишешь - уже относится не к cmd, а Python коду.
В этом была твоя начальная ошибка.
>>> это приглашение интерепратора Python, а не cmd. Отсюда и ошибка invalid syntax, которая никакого отношения в PATH и cmd не имеет. Учи матчасть.
Ну а далее - методом тыка ты нашел файл pip, открыл cmd в каталоге Scripts и ввел команду. Это - правильно. Но описал все это ты неправильно, чем вводишь в заблуждение других.
P.S. Python нужно было сразу ставить с добавлением его в PATH (для этого есть специальная галочка при установке). Тогда нет необходимости переходить в каталог Scripts для запуска pip.
Читайте также: