Understanding Python environments and package managers

#python #venv #pip #uv #conda 0️⃣ introduction well, I don't usually work with python. at least it's not my primary language. so i recently found out my entire mac was running under a default base Conda environment. I had to dig to understand python environments and package managers. 1️⃣ what is an environment official venv doc says 1: " lightweight “virtual environments”, each with their own independent set of Python packages installed in their site directories." A virtual environment is a lightweight isolated space where Python packages are installed. if 2 projects have different sets of Python packages, they would not cross-over. 2️⃣ what is a package manager? Python defaults to pip. Pip is a "a package manager (package management system) written in Python and is used to install and manage software packages" 2 A package manager installs and manages packages. Dependency, subdependency, versioning, install, remove, info etc. Virtual Environment only contains the installed packages. 2️⃣ put it together To properly work with a Python project, I would create a virtual environment. Then I would install necessary packages inside the virtual environment. ✨ venv + pip ✨ 3️⃣ Conda Conda is an alternative to venv + pip * manages everything Python and etc needed for your project. * widely used in data science - or so i've heard. I'm not sure on this. * relies on Anaconda and PyPl for the packages. Other options don't have access to Anaconda, it seems. 4️⃣ uv uv is also an alternative to venv + pip uv is super fast * widely used in software development * LangChain and LangGraph uses this 5️⃣ why do we have multiple options? i read this great article https://lnkd.in/eJ3_UsjC basically had the same question as me. 6️⃣ Quick overview I also went to #Gemini for an answer. img below is the table overview. 7️⃣ conclusion much of these would come to me more naturally when i work with Python heavily. but at least I know that I don't need to have a base Conda environment running at my root - it's convenient though. And I know that I can use venv+pip or uv for any projects I'm thinking of. #softwareengineer #softwaredevelopment #softwareengineering #softwaredeveloper #swe #sde #computerscience 1 : https://lnkd.in/ejTmWqyZ 2 : https://lnkd.in/ewiaHyRS)

  • graphical user interface, text

I've used python a bunch in my Ai boot camp its pretty handy for a lot of backend projects !

To view or add a comment, sign in

Explore content categories