I recently bought a MacBook Pro with an M3 chip and started my first Python project. I created a virtual environment and installed some packages there, which allowed my code to run correctly. However, when I deactivated the virtual environment and tried running the code in the global environment, it still worked, even though all the packages were installed only in the virtual environment. When I used `pip list` in both environments, they showed the same list of packages. Can someone help me understand why this is happening and how to fix it?
Yashvardhan Thakker is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.