r/learnpython • • 8d ago

Virtual Environment and Python

I have started learning python and decided to use pycharm as an editor. I want to know anything which will help me in this journey.

My main question is => I don't get "virtual environment" thing with python. I cloned a repo and opened it in pycharm, it says "No python interpreter configured for <repo-name>" and then suggested to create virtual environment.

I want to hear things from experience devs.

thank you.

4 Upvotes

43 comments sorted by

View all comments

Show parent comments

-1

u/Classic-Rate-5104 8d ago

Virtual environments have the drawback of encouraging the use of old (outdated) versions of packages, which in some cases can lead to serious security risks.

4

u/Confident_Hyena2506 8d ago

This is the case with software in general, so I'm not sure what your point is.

If you are referring to linux and it's integral python managed by system, then that is for the system not for your own projects - a point that causes much confusion.

It's just not correct that you can update your python to the latest and use that - this only works for trivial stuff - everything else has dependencies.

-1

u/Classic-Rate-5104 8d ago

Not completely true because i have seen many people building network services based on python packages with severe security problems in docker images. This is not strictly "system" but also not without risks

1

u/nekokattt 8d ago

How is this any different to any other programming language

-1

u/Classic-Rate-5104 8d ago

In other languages libraries have more stable interfaces but many python packages have a different interface every time you look at them. This makes this world more chaotic and unpredictable than other environments. Let me clarify, i like python very much but I wished its package-developers would be more aware of continuity and compatibility

1

u/nekokattt 8d ago

this is anecdotal

1

u/SharkSymphony 6d ago edited 6d ago

We're getting a bit afield here, but I'd drink a soda to that. 😁

I do think there are a sizable number of Python packages now that get it right. But yeah, every long-time Python programmer probably has a list of minor-version-updates-that-weren't debacles etched into their brain.