[TriLUG] Python help?

Brian McCullough via TriLUG trilug at trilug.org
Tue Oct 8 15:13:16 EDT 2024


On Tue, Oct 08, 2024 at 03:09:10PM -0400, Triangle Linux Users Group discussion list wrote:
> On Tue, Oct 08, 2024 at 03:06:20PM -0400, Crist??bal Palmer wrote:
> > On Tue, Oct 8, 2024, at 14:59, Brian McCullough via TriLUG wrote:
> > >
> > > venv/bin/python app.py
> > 
> > This rings an alarm bell for me, because it is (depending on the context/environment) not sufficient to actually load the venv.
> > 
> > In contexts where I call a python script that requires libs added via pip in a venv, I always have a shell wrapper that calls the ???activate??? script for the venv
> 
> Thank you, Cristobal.
> 
> Since I am running it an ( obviously? ) activated virtual environment,
> does this matter?
> 
> I am going to back up a bit and see if I can change the "requirements"
> file and "re-install" everything.

OK, although the original instructions ( from GitHub ) did not say to
create a virtual environment, the "install" step did complain that the
Python Virtualenv package was not installed.

This time, when I added psycopg to the "reqirements.txt" file,
everything worked correctely, no complaints.


Well, I guess we learn by failing ( or something )!


Thank you all.


Brian



More information about the TriLUG mailing list