Python Forum
installing packages Globally vs Virtually
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
installing packages Globally vs Virtually
#1
Hi all, I was wondering what are best practices regarding installing packages globally vs installing in a virtual environment. What would be some good examples of packages that should be installed globally? Thanks!
Reply
#2
i think it would depend on your situation...meaning your computer, OS type, who owns, what its used for, how many people is it used for, how many projects you are developing, etc.

I never use a virtual environment. i install everything to python even if it is to test someones package here that imports it and to only use it once. However i am also using linux, which i tend to reinstall every 6 months to a year. The same is not true with windows users. I also am using my personal PC vs a work/school one.

A useful benefit to using a virtual environment would be the ability to run numerous package versions to the same python version. Another would be those times that you use a package once, you would not have to install it to your systems python. In my opinion if you are going to consistently use a package, and not need multiple versions of it, the best solution would be to install to the systems python. Otherwise use a virtual environment.

Why the need for virtual environments?
Recommended Tutorials:
Reply
#3
I use virtual environment in many situation,also many times i don't as small code messing around and testing out stuff.
Almost always use virtual environment when working with code for web-development or larger GUI project.
This make it a lot easier if need to move code for local environment to a server,or example build .exe for a GUI prosject.

Always use virtual environment if i need to keep track of dependencies as example making a module/package,
then pip list(is totally useless on my OS) or pipenv graph(using pipenv),
will only list only dependencies in virtual environment and building wheel with setup.py becomes a lot easier.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Installing python packages in a virtual environment Led_Zeppelin 1 759 Aug-15-2023, 08:18 PM
Last Post: deanhystad
  installing prospector and updating anaconda packages amir 2 985 Dec-24-2022, 06:13 AM
Last Post: amir
  Installing Modules / packages Oshadha 1 1,701 Feb-05-2021, 08:04 PM
Last Post: Jeff900
  Getting error while installing packages using pip Shreya 2 4,046 Apr-22-2020, 08:03 AM
Last Post: Shreya
  Installing Packages Cydney 6 3,265 Mar-31-2020, 01:13 PM
Last Post: Cydney
  Installing PIP packages issue Renym 2 3,039 Dec-09-2019, 04:44 PM
Last Post: Axel_Erfurt
  Python 3.8 or 3.? Trouble installing packages dn237 5 6,786 Oct-25-2019, 07:21 PM
Last Post: snippsat
  errors while installing packages kavindu 3 5,127 Apr-02-2018, 02:33 AM
Last Post: giri_ginanjar

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020