#Any case where multiple virtual environments are used in a project?
12 messages · Page 1 of 1 (latest)
Within a single project, no. I just use one for each.
alright thats what i thought, thank you!
You may want to have a scalable solution. For that you will need to spin up additional vm’s
Sorry would you please elaborate on what scalable solution means? Like other projects building upon my code?
no, like serving hudressd or thousand clients the same time
I see, so each user might have a different version of dependencies they need to use?
No, they would normally run the same version, you just spin up the necessary number of instances to serve all clients without too much waiting
gotcha, thanks
oh, totally misunderstood venv as the term - I was on a different track of thoughts... sorry
Obviously you need a single venv for the project, unless there are incompatible packages needed. In that case you may need multiple venvs, but all venvs need to run as a separate process, so it is only feasible if you can/need to separate these processes.
do you happen to have an example where incompatible packages are needed?
not specifically, but there could be a case where you develop a package with features introduced in python 3.12, but you have a dependency on another package which had a breaking change in 3.11 and not yet fixed, so you need python 3.10 for that. in this case you would need to split your tasks to 2 processes and run two python processes (on with 3.10 and another with 3.12), you would also need to have a handoff mechanism between the 2 processes (file/pipe, shared memory, networking - some kind of IPC)...