Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Python 

pip won't install dependencies in virtualenv

I've created a python script to host a Discord Bot in a virtualenv I type in pip list to see which tools I have and see:
pip 22.0.4
setuptools 58.1.0

I need both the requests and discord.py modules so I try to install using sudo pip install requests and in the Terminal I get the message:

Requirement already satisfied: requests in /usr/lib/python3/dist-packages (2.22.0)

pip list again shows only:
pip 22.0.4
setuptools 58.1.0

any pip installations seem to be installing in the main OS not the virtualenv I tried using google and seen a couple of similar article of this subject but nothing that solves my issue, So I'm here asking the awesome people of HF
[Image: Web-Logo-copy.gif]
You do activate enviroment before running pip?

So you created venv like so: python3.10 -m venv venv
than activate: . venv/bin/activate
and install requests: pip3 install requests
(Apr 7, 2022 09:14 AM)Rekursio420 Wrote:  You do activate enviroment before running pip?

So you created venv like so: python3.10 -m venv venv
than activate: . venv/bin/activate
and install requests: pip3 install requests

Yes that's the way I did it
1 created a venv
2 activated the venv
3 tried pip install requests but didn't install anything
[Image: Web-Logo-copy.gif]


Possibly Related Threads...
Thread / Author Replies Views Last Post
by dbCookerJun 10, 2023 08:38 AM 5 210 Jun 10, 2023 08:38 AM
Last Post: Hackers
[Python] by lockheadAug 17, 2019 08:45 PM 5 198 Aug 17, 2019 08:45 PM
Last Post: datguy.dev
[Python] by george12324Jul 4, 2019 04:34 PM 7 207 Jul 4, 2019 04:34 PM
Last Post: TGilb94