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.

1

u/rake66 8d ago

Not using virtual environments also has the drawback of encouraging the use of very new versions of packages, which in some cases can lead to serious security risks.

-1

u/Classic-Rate-5104 8d ago

You're absolutely correct. The whole python environment is very "unstable" in the sense that things change constantly. However, if possible, I would trust the debian packages more than the randomly chosen requirements.txt of many packages

2

u/nekokattt 8d ago

Thats fine until breaking changes occur in packages.

Relying on debian packages also removes any build reprodicibility on the basis that you have to always be running something with access to debian repos to be able to run your code in the first place.