Python venv and cgi

How is everyone using python venv as a cgi script? is it unwise to put the env in the cgi dir? I assume you just create a wrapper to activate the env and run the script.

I broke DSN with a server upgrade and now I'm forced into venvs.

at least I think so

=> Posted in: s/programming | 🍀 gritty

Jan 15 · 3 days ago · 🤔 1

3 Comments ↓

=> 🕹ī¸ skyjake [...] ¡ Jan 16 at 04:34:

So far I've not been using venvs with CGI, instead installing dependencies system-wide and making sure the right version of the Python interpreter is used for running the CGI script.

If you do use venv, I believe you can launch the CGI script using the Python interpreter in the venv's bin directory even if the venv isn't active.

=> 🍀 gritty [OP] · Jan 16 at 17:10:

@skyjake ah okay. maybe i need to try another approach because pip and pipx both yell at me when installing a lib antenna requires. I think there's a flag to override it though, I'll try that.

=> 🕹ī¸ skyjake [...] ¡ Jan 16 at 17:23:

This is what I've been using with pip:

--break-system-packages     Allow pip to modify an EXTERNALLY-MANAGED Python
                            installation
Proxy Information
Original URL
gemini://bbs.geminispace.org/s/programming/23928
Status Code
Success (20)
Meta
text/gemini; charset=utf-8
Capsule Response Time
34.720327 milliseconds
Gemini-to-HTML Time
1.135291 milliseconds

This content has been proxied by September (ba2dc).