r/learnpython • • 9d 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

1

u/Confident_Hyena2506 9d ago

If you don't have any python then you can't run any python.

And you will need lots of different versions of python for different projects - virtual env is just a way to organise them.

-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/SharkSymphony 7d ago

I don't think I'd agree with this. Yes, you have to consider your version management across projects, but virtual environments themselves don't have an opinion on what versions of packages you use. You can pursue a latest-and-greatest strategy with them as well.