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
#7
(Jul-19-2019, 03:55 PM)Thisisaline Wrote: I may not even use any programs that cause conflict and I'd just be overcomplicating things with venv for nothing.
Yes you should just try,pip can also uninstall.
Virtual environment is build into Python newer version,so it easy to try that first.
It work for me if i do a quick test,don't find GPU as i now run Virtual-box.
# Make environment 
tom@tom-VirtualBox:~/Documents$ python -m venv watt_env

# Cd in
tom@tom-VirtualBox:~/Documents$ cd watt_env/

# Activate 
tom@tom-VirtualBox:~/Documents/watt_env$ source bin/activate

# Test pip,it point to this folder as it should
(watt_env) tom@tom-VirtualBox:~/Documents/watt_env$ pip -V
pip 19.0.3 from /home/tom/Documents/watt_env/lib/python3.7/site-packages/pip (python 3.7)

# Clone Repo
(watt_env) tom@tom-VirtualBox:~/Documents/watt_env$ git clone https://github.com/BoukeHaarsma23/WattmanGTK.git
Cloning into 'WattmanGTK'...
remote: Enumerating objects: 6, done.
remote: Counting objects: 100% (6/6), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 753 (delta 0), reused 1 (delta 0), pack-reused 747
Receiving objects: 100% (753/753), 578.10 KiB | 1.14 MiB/s, done.
Resolving deltas: 100% (487/487), done.
(watt_env) tom@tom-VirtualBox:~/Documents/watt_env$ cd WattmanGTK/
(watt_env) tom@tom-VirtualBox:~/Documents/watt_env/WattmanGTK$ ls
LICENSE  README.md  run.py  setup.py  WattmanGTK

# Test Python
(watt_env) tom@tom-VirtualBox:~/Documents/watt_env/WattmanGTK$ python -V
Python 3.7.3

# Run install
(watt_env) tom@tom-VirtualBox:~/Documents/watt_env/WattmanGTK$ python setup.py install
running install ....
A couple of error,need to install this.
sudo apt-get install libcairo2-dev
sudo apt install libgirepository1.0-de
Run install again.
(watt_env) tom@tom-VirtualBox:~/Documents/watt_env/WattmanGTK$ python setup.py install
.....
Using /home/tom/Documents/watt_env/lib/python3.7/site-packages
Finished processing dependencies for WattmanGTK==0.0.1
Quote: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?
If using pyenv Simple Python Version Management you safer from start,as it never mess with system install of Python.
It dos install Python version wanted(eg 3.7) and make it a system wide installation.
If all goes wrong just go back to local system pyenv local system.
Reply


Messages In This Thread
RE: Can't decide - install modules with Ubuntu package manager (apt) or pip3 in venv - by snippsat - Jul-19-2019, 04:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  my venv is not loading njoki 1 259 Mar-20-2024, 10:41 AM
Last Post: snippsat
  problem install somewhere package akbarza 1 493 Dec-27-2023, 01:25 PM
Last Post: Gribouillis
  Not able to install package caldwellpy and requirement txt file Samta282006 1 719 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,285 May-10-2023, 02:13 PM
Last Post: Calab
  Confused over Conda Package manager vs PIP JanOlvegg 3 1,230 Mar-09-2023, 02:09 PM
Last Post: JanOlvegg
  Python venv and PIP version issue JanOlvegg 2 1,276 Feb-22-2023, 02:22 AM
Last Post: JanOlvegg
  Visual Studio Code venv ibm_db error mesi1000 7 2,826 Nov-13-2022, 12:36 AM
Last Post: snippsat
  ModuleNotFoundError: No module named '_struct' when starting pip3 yuhuihu 0 2,878 May-05-2022, 04:41 AM
Last Post: yuhuihu
  can not install pymesh in ubuntu jerry 2 2,168 Mar-23-2022, 02:04 AM
Last Post: jerry
  cmake and pip3 install warnings with python 3.10.2 cyrduf 0 1,906 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