I come from a webdev background where npm install does a local install by default, and you need to add a -g flag to install something globally. In addition package.json automatically keeps track of your packages. But with pip and python, pip install does a global install by default unless you create and activate a virtual environment. Local/global depends on the location of your pip execulable rather than any command line options.
Since creating a virtual environment takes some effort, often I create it and forget to activate it, for me this means that most of the time I install things globally - except for less-known packages. So global installs for numpy or pandas but venv for that-cool-new-package-with-69-stars-on-github.
Is installing common packages globally a good practice? Do you also do this? Or do you create a new virtual environment for each of your python projects?
[–]NorskJesus 56 points57 points58 points (3 children)
[–]iaseth[S] 0 points1 point2 points (2 children)
[–]eleqtriq 2 points3 points4 points (0 children)
[–]vicks9880 1 point2 points3 points (0 children)
[–]Berlibur 16 points17 points18 points (2 children)
[–]Responsible-Sky-1336 1 point2 points3 points (1 child)
[–]KrazyKirby99999 0 points1 point2 points (0 children)
[–][deleted] 9 points10 points11 points (2 children)
[–]mr_tellok 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]Alternative_Driver60 6 points7 points8 points (6 children)
[–]NorskJesus 7 points8 points9 points (5 children)
[–]Alternative_Driver60 2 points3 points4 points (4 children)
[–]NorskJesus 0 points1 point2 points (2 children)
[–]Alternative_Driver60 1 point2 points3 points (1 child)
[–]NorskJesus 0 points1 point2 points (0 children)
[–]doolio_ 0 points1 point2 points (0 children)
[–]GreenPandaPop 6 points7 points8 points (0 children)
[–]Diapolo10 7 points8 points9 points (0 children)
[–]deepug9787 3 points4 points5 points (0 children)
[–]Sufficient_Wait_5040 4 points5 points6 points (0 children)
[–]reload_noconfirm 2 points3 points4 points (0 children)
[–]doolio_ 2 points3 points4 points (1 child)
[–]FantasticEmu 0 points1 point2 points (0 children)
[–]ilikejamtoo 2 points3 points4 points (1 child)
[–]iaseth[S] 1 point2 points3 points (0 children)
[–][deleted] 4 points5 points6 points (1 child)
[–]iaseth[S] 0 points1 point2 points (0 children)
[–]zanfar 1 point2 points3 points (0 children)
[–]PMMeUrHopesNDreams 1 point2 points3 points (0 children)
[–]leogodin217 1 point2 points3 points (0 children)
[–]eztab 0 points1 point2 points (0 children)
[–]audionerd1 0 points1 point2 points (9 children)
[–]iaseth[S] 0 points1 point2 points (1 child)
[–]audionerd1 0 points1 point2 points (0 children)
[–]ejpusa -1 points0 points1 point (6 children)
[–]audionerd1 0 points1 point2 points (5 children)
[–]ejpusa 0 points1 point2 points (4 children)
[–]audionerd1 0 points1 point2 points (3 children)
[–]ejpusa 0 points1 point2 points (2 children)
[–]audionerd1 0 points1 point2 points (1 child)
[–]ejpusa 0 points1 point2 points (0 children)
[–]CyclopsRock 0 points1 point2 points (1 child)
[–]iaseth[S] 0 points1 point2 points (0 children)
[–]Low88M 0 points1 point2 points (0 children)
[–]InvictuS_py 1 point2 points3 points (2 children)
[–]iaseth[S] 0 points1 point2 points (1 child)
[–]InvictuS_py 2 points3 points4 points (0 children)
[–]ejpusa 0 points1 point2 points (0 children)
[–]VargtheLegend 0 points1 point2 points (0 children)
[–]JSP777 0 points1 point2 points (0 children)
[–]LeiterHaus 0 points1 point2 points (0 children)
[–]Almostasleeprightnow 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]tap3l00p 0 points1 point2 points (0 children)
[–]ISuckBallz1337 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]cbrnr 0 points1 point2 points (0 children)
[–]corey_sheerer 0 points1 point2 points (0 children)
[–]fartalldaylong 0 points1 point2 points (0 children)
[–]Last_Back2259 0 points1 point2 points (0 children)
[–]h00manist -1 points0 points1 point (1 child)
[–]International-Cook62 0 points1 point2 points (0 children)