Pacman vs - {where to put python libraries}

Hi, i’v been noisy for a while in here, and I appreciate the :heart: I also never know where to post things so feel free to recategorize them.

Help Section
Case Scenario

  1. I want to use pacman to install some cli tools written in python.
  2. I don’t want these specific apps and their depandancies to be installed in the system wide python environment but instead into a virtual environment I have created for certain applications.
  3. I know I will have to activate the virtual environment each time i want to use this apps , but thats how I want it.
    How can I achieve this? Is it even possible
    N.b I have an alias → activate to always activate my specific python storage location for “trash libraries”
garuda-inxi as per the rules
System:
 Kernel: 6.7.5-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
   clocksource: tsc avail: acpi_pm
   parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
   root=UUID=5cdaaea7-2d12-4fc9-8004-fda5bae9be22 rw rootflags=subvol=@
   quiet rd.udev.log_priority=3 vt.global_cursor_default=0 loglevel=3
   ibt=off
 Desktop: Hyprland v: 0.35.0 with: jgmenu,waybar tools:
   avail: i3lock,swaylock,xautolock vt: 1 dm: 1: LightDM v: 1.32.0
   note: stopped 2: SDDM Distro: Garuda base: Arch Linux
Machine:
 Type: Laptop System: Hewlett-Packard product: HP EliteBook 840 G2
   v: A3009D510203 serial: <superuser required> Chassis: type: 10
   serial: <superuser required>
 Mobo: Hewlett-Packard model: 2216 v: KBC Version 96.56
   serial: <superuser required> part-nu: N0Y03UC#ABU uuid: <superuser required>
   UEFI: Hewlett-Packard v: M71 Ver. 01.09 date: 09/01/2015
Battery:
 ID-1: BAT0 charge: 11.5 Wh (64.2%) condition: 17.9/17.9 Wh (100.0%)
   volts: 10.8 min: 11.4 model: Hewlett-Packard Primary type: Li-ion
   serial: <filter> status: discharging
CPU:
 Info: model: Intel Core i5-5300U bits: 64 type: MT MCP arch: Broadwell
   gen: core 5 level: v3 note: check built: 2015-18 process: Intel 14nm
   family: 6 model-id: 0x3D (61) stepping: 4 microcode: 0x2F
 Topology: cpus: 1x cores: 2 tpc: 2 threads: 4 smt: enabled cache:
   L1: 128 KiB desc: d-2x32 KiB; i-2x32 KiB L2: 512 KiB desc: 2x256 KiB
   L3: 3 MiB desc: 1x3 MiB
 Speed (MHz): avg: 825 high: 1800 min/max: 500/2900 scaling:
   driver: intel_cpufreq governor: schedutil cores: 1: 1800 2: 500 3: 500
   4: 500 bogomips: 18358
 Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
 Vulnerabilities: <filter>
Graphics:
 Device-1: Intel HD Graphics 5500 vendor: Hewlett-Packard ZBook 15u G2
   Mobile Workstation driver: i915 v: kernel arch: Gen-8 process: Intel 14nm
   built: 2014-15 ports: active: eDP-1 empty: DP-1, DP-2, HDMI-A-1, HDMI-A-2
   bus-ID: 00:02.0 chip-ID: 8086:1616 class-ID: 0300
 Device-2: Cheng Uei Precision Industry (Foxlink) HP EliteBook integrated
   HD Webcam driver: uvcvideo type: USB rev: 2.0 speed: 480 Mb/s lanes: 1
   mode: 2.0 bus-ID: 2-7:5 chip-ID: 05c8:0374 class-ID: 0e02
 Display: wayland server: X.org v: 1.21.1.11 with: Xwayland v: 23.2.4
   compositor: Hyprland v: 0.35.0 driver: X: loaded: modesetting unloaded: vesa
   alternate: fbdev,intel dri: iris gpu: i915 display-ID: 1
 Monitor-1: eDP-1 model: AU Optronics 0x233e built: 2012 res: 1600x900
   dpi: 132 gamma: 1.2 size: 309x174mm (12.17x6.85") diag: 355mm (14")
   ratio: 16:9 modes: 1600x900
 API: EGL v: 1.5 hw: drv: intel iris platforms: device: 0 drv: iris
   device: 1 drv: swrast surfaceless: drv: iris wayland: drv: iris x11:
   drv: iris inactive: gbm
 API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 24.0.1-arch1.1
   glx-v: 1.4 direct-render: yes renderer: Mesa Intel HD Graphics 5500 (BDW
   GT2) device-ID: 8086:1616 memory: 11.29 GiB unified: yes
 API: Vulkan v: 1.3.276 layers: 10 device: 0 type: integrated-gpu
   name: Intel HD Graphics 5500 (BDW GT2) driver: mesa intel v: 24.0.1-arch1.1
   device-ID: 8086:1616 surfaces: xcb,xlib,wayland device: 1 type: cpu
   name: llvmpipe (LLVM 16.0.6 256 bits) driver: mesa llvmpipe
   v: 24.0.1-arch1.1 (LLVM 16.0.6) device-ID: 10005:0000
   surfaces: xcb,xlib,wayland
Audio:
 Device-1: Intel Broadwell-U Audio vendor: Hewlett-Packard
   driver: snd_hda_intel v: kernel bus-ID: 00:03.0 chip-ID: 8086:160c
   class-ID: 0403
 Device-2: Intel Wildcat Point-LP High Definition Audio
   vendor: Hewlett-Packard driver: snd_hda_intel v: kernel bus-ID: 00:1b.0
   chip-ID: 8086:9ca0 class-ID: 0403
 API: ALSA v: k6.7.5-zen1-1-zen status: kernel-api tools: N/A
 Server-1: sndiod v: N/A status: off tools: aucat,midicat,sndioctl
 Server-2: PipeWire v: 1.0.3 status: active with: 1: pipewire-pulse
   status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
   4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl
Network:
 Device-1: Intel Ethernet I218-LM vendor: Hewlett-Packard driver: e1000e
   v: kernel port: 5080 bus-ID: 00:19.0 chip-ID: 8086:15a2 class-ID: 0200
 IF: enp0s25 state: down mac: <filter>
 Device-2: Intel Wireless 7265 driver: iwlwifi v: kernel pcie: gen: 1
   speed: 2.5 GT/s lanes: 1 bus-ID: 03:00.0 chip-ID: 8086:095a class-ID: 0280
 IF: wlo1 state: up mac: <filter>
 IF-ID-1: ipv6leakintrf0 state: unknown speed: N/A duplex: N/A
   mac: <filter>
 IF-ID-2: proton0 state: unknown speed: 10000 Mbps duplex: full mac: N/A
 Info: services: NetworkManager, systemd-networkd, systemd-timesyncd,
   wpa_supplicant
Bluetooth:
 Device-1: Intel Bluetooth wireless interface driver: btusb v: 0.8 type: USB
   rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 2-4:3 chip-ID: 8087:0a2a
   class-ID: e001
 Report: btmgmt ID: hci0 rfk-id: 1 state: up address: <filter> bt-v: 4.0
   lmp-v: 6 status: discoverable: yes pairing: yes class-ID: 6c010c
RAID:
 Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci
   v: 3.0 port: 5060 bus-ID: 00:1f.2 chip-ID: 8086:282a rev: N/A class-ID: 0104
Drives:
 Local Storage: total: 931.51 GiB used: 409.41 GiB (44.0%)
 SMART Message: Required tool smartctl not installed. Check --recommends
 ID-1: /dev/sda maj-min: 8:0 vendor: Seagate model: ST1000LM035-1RK172
   size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
   tech: HDD rpm: 5400 serial: <filter> fw-rev: RSM7 scheme: GPT
Partition:
 ID-1: / raw-size: 491.68 GiB size: 491.68 GiB (100.00%)
   used: 409.41 GiB (83.3%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
 ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
   used: 296 KiB (0.1%) fs: vfat dev: /dev/sda1 maj-min: 8:1
 ID-3: /home raw-size: 491.68 GiB size: 491.68 GiB (100.00%)
   used: 409.41 GiB (83.3%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
 ID-4: /var/log raw-size: 491.68 GiB size: 491.68 GiB (100.00%)
   used: 409.41 GiB (83.3%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
 ID-5: /var/tmp raw-size: 491.68 GiB size: 491.68 GiB (100.00%)
   used: 409.41 GiB (83.3%) fs: btrfs dev: /dev/sda2 maj-min: 8:2
Swap:
 Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
 ID-1: swap-1 type: zram size: 11.56 GiB used: 941 MiB (8.0%) priority: 100
   comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842 max-streams: 4 dev: /dev/zram0
Sensors:
 System Temperatures: cpu: 57.0 C mobo: N/A
 Fan Speeds (rpm): N/A
Info:
 Memory: total: 12 GiB available: 11.56 GiB used: 5.08 GiB (44.0%)
 Processes: 231 Power: uptime: 2h 25m states: freeze,mem,disk suspend: deep
   avail: s2idle wakeups: 0 hibernate: platform avail: shutdown, reboot,
   suspend, test_resume image: 4.58 GiB services: upowerd Init: systemd
   v: 255 default: graphical tool: systemctl
 Packages: 2467 pm: nix-default pkgs: 0 pm: nix-sys pkgs: 0 pm: nix-usr
   pkgs: 0 pm: pacman pkgs: 2436 libs: 512 tools: aura,pamac,paru,yay
   pm: flatpak pkgs: 19 pm: snap pkgs: 12 Compilers: clang: 16.0.6
   gcc: 13.2.1 Shell: garuda-inxi default: fish v: 3.7.0 running-in: tmux:
   inxi: 3.3.33
Garuda (2.6.23-1):
 System install date:     2022-01-22
 Last full system update: 2024-02-21
 Is partially upgraded:   Yes
 Relevant software:       snapper NetworkManager mkinitcpio
 Windows dual boot:       No/Undetected
 Failed units:            

Why not just directly use pipx to download these cli tools? Won’t it do exactly what you want?

I would use pipx
edit: @NaN was faster :smiley:

1 Like

Kinda having this .desktop entries automatically generated or me is a time saver

It’s not as if the .desktop files are ever going to be overwritten. You can just visit these packages in arch repo or aur where ever they are and just view the repo to download/copy the .desktop file. Even tweak it if you want.

1 Like

Ok, so I have archstrike & blackarch repos installed.
P.s I know – am sorry

And as much as they are both a piece of work in screwing up with dependencies. They contain packages I can download and uninstall easily whenever I want to.
Sadly this also end up screwing with my system libraries – I think

I want to Isolate their packages from my system packages. But I also want to use them.

Other Notes that might show you why I need them

I use jgmenu - it helps with my short term memory, to remember what I installed.

pacman -Sgg | grep package

does the same thing, but is slower to me

You can install some of the famous libraries of python like pandas library thorugh pacman
like this :

sudo pacman -S python-<pkaganme>

for example for pandas

sudo pacman -S python-pandas 

many of important pip packages are provided by pacman but not all
And can’t say about CLI things
(And IDK even this thing will help :sweat_smile: )

As you might have noticed above, I have included repos that may be considered an Omen. And even more likely get me shamed here. And for that I am sorry.

They are bad at using latest dependencies. And so, while one might be using say requests3.1 the other 2.2

Do you think there is possibly no way to achieve this, and I will have to write a script to sort this mess out resorting to pipx?

Meaning NaNs solution should be the solution?

Well jgmenu doesn’t seem to have any .desktop files from what I can see.

It’s build instructions are only executing the package provided configuration script.

Btw,
why do you feel that you can’t launch/use the program from terminal given this is a cli program when it wouldn’t have a .desktop file?

Terminal doesn’t read .desktop files anyway.

1 Like

I would just say to use things like docker, put one app on one docker container, other on another docker container if they are not expected to be interacting with each other in such a way that they are installed in a single OS :eyes:

I can’t think of any other way to achieve something like this , in which you need specific version for specific proogramm

I kinda have short term memory loss, maybe even longterm.
Its hard to explain but I use it to remember stuff. I use wofi always though.
I think this picture will help you understand why I need it

Sorry. I couldnt get a precise screenshot

It is a viable solution. The only problem is it would be nice if pacman handled everything.

1 Like

From the jgmenu image, you can see… I use jgmenu to remember where stuff should be. What games I have installed. Probably why it will be harder for me to switch from xorg to wayland easily

I think I will just resort to docker for this things that screw up my system.
I will uninstall this things today :smiling_face_with_tear:

I also think when installing [garuda-blackarch], there should be a large warning in red

This thing does not play nice with other libraries

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.