#๐ PIP
71 messages ยท Page 1 of 1 (latest)
@spare cargo
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.
when i go to the link to install the pip file (https://bootstrap.pypa.io/get-pip.py) i cant find a place to install it, its just pip
pip should just ship with any modern Python. get-pip was a transition tool for earlier Pythons.
how can i check if pip is there cause i dont think its there
last time i did it (about a few months to a year back) i had to manually install pip
If you invoke Python as python, run: python -m pip help
Adjust python to suit.
!dashmpip
When trying to install a package via pip, it's recommended to invoke pip as a module: python -m pip install your_package.
Why would we use python -m pip instead of pip?
Invoking pip as a module ensures you know which pip you're using. This is helpful if you have multiple Python versions. You always know which Python version you're installing packages to.
Note
The exact python command you invoke can vary. It may be python3 or py, ensure it's correct for your system.
this is shell
Yeah. Back out to your command line prompt.
this one is python 64 bit
Get a windows command prompt instead.
Yes. You're at the Python interactive prompt. You want cmd.exe or Power Shell to run python -m pip.
On Windows it's spelled py -m pip.
Can you show a screenshot of py -m pip help at the windows command prompt?
Excellent.
i put python -m pip help
Usually you need pip in order to install something.
... so did you need to install something specific?
well im coding a discord bot in python and one of the first steps is to install pip
Ok. pip is installed, you're good there.
i was supposed to run $ pip install -U discord.py
in shell
but when i did i got error invalid syntax
same error
Show the error pls/
The $ prompt, BTW, is something I associate with a UNIX shell.
Ah! You're back in the Python prompt. Go back to the command prompt.
... and that $ you typed is in fact a prompt from the example. Leave it out.
sry it said to do the command in shell
oh
Yes. In UNIX, that means the command line environment. Not the Python interactive prompt.
You want the Windows command line.
i think i should re do my harvard course TvT
"TvT" ?
Get back to your Windows command prompt, the one with C:\users\idkla>. At that prompt, type python -m pip install -U discord
yeah it downloaded
Huzzah!
tysm ๐
So python is a command. It has to happen at the windows command prompt. The >>> prompt is Python's interactive prompt, it expect Python syntax.
i see
To verify, get back to the Python prompt and type import discord.
It should succeed (silently).
shell or just python?
import discord is a Python statement. Type it at the >>> prompt.
i just understood the joke ๐
yeah it imported
Well I was in fact being literal.
Yay!
So the discord package is installed. You should be able to proceed now.
Sounds like their tutorial/guide is using UNIX nomenclature. So: "shell" means the Windows command prompt.
ohh i see
tysm
Good luck. I need to go AFK.
and im back again because im so confused about this error
Traceback (most recent call last):
File "<pyshell#5>", line 1, in <module>
client = discord.Client()
TypeError: Client.__init__() missing 1 required keyword-only argument: 'intents'```
hmmm
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.
๐ PIP