#πŸ”’ Pip issues ( i think)

40 messages Β· Page 1 of 1 (latest)

odd karma
#

I have a beautifully working discord bot, but whenever i try starting the bot anywhere but vs code I get an error telling me i dont have discord.py installed.
Now you think i'm stupid, because it sounds like an easy fix, but:

  1. i installed all the packages i need in a vs code terminal (it works there)
  2. I cannot for the life of me get even pip to work from a "normal" terminal.

I have tried to find the path to Pip so i can add that to $PATH, but i couldnt find it.

I use vanilla Arch and my preferred terminal is Alacritty.

robust relicBOT
#

@odd karma

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.

robust relicBOT
#
Install packages with `python -m pip`

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.

odd karma
#

no such module named pip

fading tundra
odd karma
#

i think i used pacman

fading tundra
#

pacman -S python-pip

odd karma
#

i was wondering why i couldnt do 'pacman -S pip'

#

lol

eager heron
# odd karma

Did you attempt to do what the error message suggested?

eager heron
odd karma
eager heron
#

Alright, did you try the other suggestion?

odd karma
#

kinda not

eager heron
#

Is there a specific reason for that?

odd karma
eager heron
#

or you just haven't tried yet?

odd karma
eager heron
#

venv is in the stdlib, so it should work

odd karma
#

tf is stdlib?

eager heron
#

It's in python out-of-the-box (you don't have to install it separately)

odd karma
#

ah, great i'll try that

#

how'd i find the path to venv?

eager heron
#

It's in the place where you created it

odd karma
#

oooh, so path/to/vensv/ just means where i want to create it

#

where would i make sense to create it?

eager heron
#

It's usually put into ./.venv

odd karma
#

where is .

eager heron
#

It's the current working directory

odd karma
#

aah

#

so i jsut put in in home?

eager heron
#

Well I would put it in the bot project's directory

odd karma
#

ok

#

it works, tysm

#

!close

robust relicBOT
#
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.