r/Python • • Dec 18 '18

Python Virtual Environments: Extreme Advertising Edition

Post image
2.1k Upvotes

287 comments sorted by

View all comments

4

u/lungdart Dec 19 '18

Maybe it's because I'm an old c++ dev who's only been coding in Python for a few years, but virtual environments are a solution to a problem I've never had.

What the hell are you guys doing to get into these dependency hells?!

4

u/JoseALerma Dec 19 '18

At one point, I was working on 4 different python projects at once. Some of them were using APIs that, for example, used different versions of requests, so having venvs helped keep them separate.

Another is when I build documentation with sphinx. I keep a separate venv for the docs so that no extra packages are installed to the main project

1

u/lungdart Dec 19 '18

Why didn't you consolidate and update all versions of requests?

3

u/root45 Dec 19 '18

Because of breaking changes.

→ More replies (7)