r/learnpython • • 10d 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/5960312 10d ago

Your virtual environment is an alternative location where your programming profile will live. So instead of saving everything in the your C drive you can set up a new desktop so to speak within your drive that you only use for programming. If you don’t set up a programming environment then anything you create or download will save to your root drive and that’s obviously bad for security.

0

u/Classic-Rate-5104 10d 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/nekokattt 10d ago

They do not encourage this at all, they encourage you being able to reproduce builds.

Just because people do not maintain their projects properly does not mean it is anything to do with virtual environments. Don't use them and just use the system site-packages and you will still have the same issue.