Python Forum
Can't decide - install modules with Ubuntu package manager (apt) or pip3 in venv
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't decide - install modules with Ubuntu package manager (apt) or pip3 in venv
#1
Hello python community,

I'm a relative noob in linux (Ubuntu) and python who needs to downclock my gpu using WattmanGTK: https://github.com/BoukeHaarsma23/WattmanGTK, that requires matplotlib, setuptools, python3-gi, and python-3 cairo. This is also my first time installing something like this in this way from github.

I've read extensively over the past couple of days, enough to understand the general differences between using apt (Ubuntu package manager) and pip and the utility of venv. However I have no experience and knowledge as reference to make a judgement call on whether it's only necessary for me to simply install the modules with apt or if it's worthwhile and I'm better off installing them with pip3 in a venv to avoid any potential future version or dependency conflicts, the likelihood of which I'm unsure of since being new to linux, I don't know what are the chances that I will need to use another program which requires conflicting versions or dependencies.

So my main question is:

1. Should I use apt - Ubuntu's package manager to install the modules globally, or pip3 to install the modules in a venv, and why?

I have a few follow up questions, if you don't mind answering, to clarify if I'm understanding correctly:

2. My understanding is that as long as you avoid giving pip root access - sudo pip in Ubuntu - you will avoid the possibility of inadvertently altering system files and breaking the OS. Is this correct?

3. My understanding is that venv is the only way to avoid conflicts. Installing different versions in root (sudo apt) and in a non-root directory (pip -user) both provide global access and does not avoid conflicts. Is this correct?

4. This may seem obvious but I just want to be sure: If I were to install the modules in a venv, I assume that I will have to clone the repository for the program (WattmanGTK), install it and run it from in the venv. Is this right? This bring me to the last question:

5. With reference to Q4, is there a way to access a graphical interface of the venv through the file manager so you can actually see what files are in it. i.e. could I see the repository for the program after putting it in the venv? Or is it only possible to access and interact with the files in venv through command line?

Thank you very much in advance.
Reply


Messages In This Thread
Can't decide - install modules with Ubuntu package manager (apt) or pip3 in venv - by Thisisaline - Jul-18-2019, 05:49 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  my venv is not loading njoki 1 233 Mar-20-2024, 10:41 AM
Last Post: snippsat
  problem install somewhere package akbarza 1 478 Dec-27-2023, 01:25 PM
Last Post: Gribouillis
  Not able to install package caldwellpy and requirement txt file Samta282006 1 704 Dec-07-2023, 11:59 PM
Last Post: Larz60+
  Understanding venv; How do I ensure my python script uses the environment every time? Calab 1 2,260 May-10-2023, 02:13 PM
Last Post: Calab
  Confused over Conda Package manager vs PIP JanOlvegg 3 1,207 Mar-09-2023, 02:09 PM
Last Post: JanOlvegg
  Python venv and PIP version issue JanOlvegg 2 1,253 Feb-22-2023, 02:22 AM
Last Post: JanOlvegg
  Visual Studio Code venv ibm_db error mesi1000 7 2,786 Nov-13-2022, 12:36 AM
Last Post: snippsat
  ModuleNotFoundError: No module named '_struct' when starting pip3 yuhuihu 0 2,868 May-05-2022, 04:41 AM
Last Post: yuhuihu
  can not install pymesh in ubuntu jerry 2 2,144 Mar-23-2022, 02:04 AM
Last Post: jerry
  cmake and pip3 install warnings with python 3.10.2 cyrduf 0 1,894 Feb-26-2022, 01:08 PM
Last Post: cyrduf

Forum Jump:

User Panel Messages

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