#๐Ÿ”’ venv not carrying pip packages from clonning repos

24 messages ยท Page 1 of 1 (latest)

small rose
#

I set up a venv for a project, activated it and all on my laptop while at uni. Then i saved it and create a repo for it (venv and project included in the repo). Now at my home desktop i when i cloned my repo it just gives an error because the packages i installed with pip in my laptop just are not present, for i usually never download any global env packages. Is it something im doing wrong?

pseudo jewelBOT
#

@small rose

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.

small rose
#

nothing, just says that the packages are not installed

proud zodiac
#

Did you activate your venv?

small rose
#

i activated the venv and all, in my laptop when i first created and installed the packages locally, it worked just fine. After i uploaded it to a repo and cloned in my home desktop it just doesnt seem to be installed anymore. Dont know if this is normal behaviour or not, suppose it isnt

small rose
proud zodiac
#

On your home desktop, did you activate your venv?

proud zodiac
#

what package is missing?

small rose
proud zodiac
#

one problem at a time

small rose
#
$ pip list
Package Version
------- -------
pip     24.0

[notice] A new release of pip is available: 24.0 -> 24.1
[notice] To update, run: C:\Users\Aron\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\python.exe -m pip install --upgrade pip
proud zodiac
#

OK change your workflow. Don't upload the .venv folder to the repo

#

On your laptop do py -m pip freeze > requirements.txt

#

Then upload requirements.txt to your repo

#

Then pull requirements.txt from your repo on your desktop PC

#

Then activate/create a venv, then pip install -r requirements.txt

#

Then the whole thing should work

#

Thats the better env workflow practice

small rose
#

ok ill do that, much thanks!

pseudo jewelBOT
#
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.