recomendation to create virtual environment in Python with Python 3.12  [Solved]

Help for Current Versions of MX
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
User avatar
michaelbr
Posts: 230
Joined: Thu Dec 05, 2019 4:33 am

recomendation to create virtual environment in Python with Python 3.12

#1 Post by michaelbr »

I have an app which requires Python 3.12, I assume the recommended way is to create a Python virtual environment (venv), my current installed Python is 3.11, and according to the documentation, the venv I'm creating will have the same version of command I'm using (which is 3.11). Is this the way to do it?
1) create venv using Python 3.11
2) using pip to install Python 3.12? If so, is it possible to remove Python 3.11? how?
QSI

Code: Select all

System:
  Kernel: 6.1.0-31-amd64 [6.1.128-1] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.1.0-31-amd64 root=UUID=<filter> ro quiet splash
    init=/lib/systemd/systemd
  Desktop: Xfce v: 4.20.0 tk: Gtk v: 3.24.38 info: xfce4-panel wm: xfwm v: 4.20.0 vt: 7
    dm: LightDM v: 1.32.0 Distro: MX-23.5_x64 Libretto January 21  2024 base: Debian GNU/Linux 12
    (bookworm)
Machine:
  Type: Desktop Mobo: BESSTAR TECH model: UM250 v: V1.0 serial: <superuser required>
    UEFI: American Megatrends v: 5.13 date: 01/07/2021
CPU:
  Info: model: AMD Ryzen 5 PRO 2500U w/ Radeon Vega Mobile Gfx bits: 64 type: MT MCP arch: Zen
    level: v3 note: check built: 2017-19 process: GF 14nm family: 0x17 (23) model-id: 0x11 (17)
    stepping: 0 microcode: 0x810100B
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache: L1: 384 KiB
    desc: d-4x32 KiB; i-4x64 KiB L2: 2 MiB desc: 4x512 KiB L3: 4 MiB desc: 1x4 MiB
  Speed (MHz): avg: 1587 high: 1600 min/max: 1600/2000 boost: enabled scaling:
    driver: acpi-cpufreq governor: ondemand cores: 1: 1600 2: 1600 3: 1600 4: 1600 5: 1499 6: 1600
    7: 1600 8: 1600 bogomips: 31938
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed mitigation: untrained return thunk; SMT vulnerable
  Type: spec_rstack_overflow mitigation: safe RET
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines; IBPB: conditional; STIBP: disabled; RSB filling;
    PBRSB-eIBRS: Not affected; BHI: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Raven Ridge [Radeon Vega Series / Radeon Mobile Series] driver: amdgpu v: kernel
    arch: GCN-5 code: Vega process: GF 14nm built: 2017-20 pcie: gen: 3 speed: 8 GT/s lanes: 16
    ports: active: HDMI-A-1 empty: DP-1,DP-2,DP-3 bus-ID: 04:00.0 chip-ID: 1002:15dd class-ID: 0300
    temp: 34.0 C
  Display: x11 server: X.Org v: 1.21.1.7 compositor: xfwm v: 4.20.0 driver: X: loaded: amdgpu
    unloaded: fbdev,modesetting,vesa dri: radeonsi gpu: amdgpu display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 509x286mm (20.04x11.26") s-diag: 584mm (22.99")
  Monitor-1: HDMI-A-1 mapped: HDMI-A-0 model: Samsung C24F390 serial: <filter> built: 2021
    res: 1920x1080 hz: 60 dpi: 94 gamma: 1.2 size: 521x293mm (20.51x11.54") diag: 598mm (23.5")
    ratio: 16:9 modes: max: 1920x1080 min: 720x400
  API: OpenGL v: 4.6 Mesa 22.3.6 renderer: AMD Radeon Vega 8 Graphics (raven LLVM 15.0.6 DRM
    3.49 6.1.0-31-amd64) direct-render: Yes
Audio:
  Device-1: AMD Raven/Raven2/Fenghuang HDMI/DP Audio driver: snd_hda_intel v: kernel pcie: gen: 3
    speed: 8 GT/s lanes: 16 bus-ID: 04:00.1 chip-ID: 1002:15de class-ID: 0403
  Device-2: AMD ACP/ACP3X/ACP6x Audio Coprocessor driver: snd_pci_acp3x v: kernel
    alternate: snd_rn_pci_acp3x, snd_pci_acp5x, snd_pci_acp6x pcie: gen: 3 speed: 8 GT/s lanes: 16
    bus-ID: 04:00.5 chip-ID: 1022:15e2 class-ID: 0480
  Device-3: AMD Family 17h/19h HD Audio driver: snd_hda_intel v: kernel pcie: gen: 3
    speed: 8 GT/s lanes: 16 bus-ID: 04:00.6 chip-ID: 1022:15e3 class-ID: 0403
  API: ALSA v: k6.1.0-31-amd64 status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 1.0.0 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: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169 v: kernel pcie:
    gen: 1 speed: 2.5 GT/s lanes: 1 port: f000 bus-ID: 01:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: eth0 state: down mac: <filter>
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169 v: kernel pcie:
    gen: 1 speed: 2.5 GT/s lanes: 1 port: e000 bus-ID: 02:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: eth1 state: up speed: 1000 Mbps duplex: full mac: <filter>
  Device-3: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel modules: wl pcie: gen: 2 speed: 5 GT/s
    lanes: 1 bus-ID: 03:00.0 chip-ID: 8086:2723 class-ID: 0280
  IF: wlan0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel AX200 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 3-2:2 chip-ID: 8087:0029
    class-ID: e001
  Report: hciconfig ID: hci0 rfk-id: 1 state: up address: <filter> bt-v: 3.0 lmp-v: 5.2
    sub-v: 200f hci-v: 5.2 rev: 200f
  Info: acl-mtu: 1021:4 sco-mtu: 96:6 link-policy: rswitch sniff link-mode: peripheral accept
    service-classes: rendering, capturing, audio, telephony
Drives:
  Local Storage: total: 1.38 TiB used: 672.32 GiB (47.7%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Seagate model: ST1000LM048-2E7172 size: 931.51 GiB
    block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5400 serial: <filter>
    rev: 0001 scheme: GPT
  ID-2: /dev/sdb maj-min: 8:16 vendor: Kingston model: OM8P0S3512F-00 size: 476.94 GiB
    block-size: physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: N2.3
    scheme: GPT
Partition:
  ID-1: / raw-size: 424.2 GiB size: 416.48 GiB (98.18%) used: 78.67 GiB (18.9%) fs: ext4
    dev: /dev/sdb6 maj-min: 8:22
  ID-2: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%) used: 26.1 MiB (27.2%) fs: vfat
    dev: /dev/sdb2 maj-min: 8:18
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 3.91 GiB used: 1.2 MiB (0.0%) priority: -2 dev: /dev/sdb5
    maj-min: 8:21
Sensors:
  System Temperatures: cpu: 33.6 C mobo: N/A gpu: amdgpu temp: 33.0 C
  Fan Speeds (RPM): N/A
Repos:
  Packages: 2508 pm: dpkg pkgs: 2492 libs: 1273 tools: apt,apt-get,aptitude,nala,synaptic pm: rpm
    pkgs: 0 pm: flatpak pkgs: 8 pm: snap pkgs: 8
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/brave-browser-release.list
    1: deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian/ bookworm-updates main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian/ bookworm main contrib non-free non-free-firmware
    2: deb http://security.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/microsoft-edge.list
    1: deb [arch=amd64] https://packages.microsoft.com/repos/edge/ stable main
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb http://nl.mxrepo.com/mx/repo/ bookworm main non-free
  Active apt repos in: /etc/apt/sources.list.d/extrepo_librewolf.sources
    1: deb [arch=amd64 arm64] https://repo.librewolf.net librewolf main
  Active apt repos in: /etc/apt/sources.list.d/protonvpn-stable.sources
    1: deb https://repo.protonvpn.com/debian stable main
Info:
  Processes: 321 Uptime: 3h 32m wakeups: 0 Memory: 15.32 GiB used: 6.18 GiB (40.3%) Init: systemd
  v: 252 target: graphical (5) default: graphical tool: systemctl Compilers: gcc: 12.2.0 alt: 12
  Client: shell wrapper v: 5.2.15-release inxi: 3.3.26
Boot Mode: UEFI
AMD Ryzen 5 Pro 2500U, 16GB, 512 SSD, 1TB HDD, MX23.2
Thanks so much for your comment/suggestion
Michael

User avatar
CharlesV
Administrator
Posts: 8088
Joined: Sun Jul 07, 2019 5:11 pm

Re: recomendation to create virtual environment in Python with Python 3.12  [Solved]

#2 Post by CharlesV »

Personally ... I find it MUCH better to create a VM (I use virtualbox ) , and then setup my dev environment there. Not only does this SAVE me from "polluting" my main desktop, but it creates a base for me to work with that wont be polluted BY my main machine.
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!

User avatar
michaelbr
Posts: 230
Joined: Thu Dec 05, 2019 4:33 am

Re: recomendation to create virtual environment in Python with Python 3.12

#3 Post by michaelbr »

CharlesV wrote: Thu Mar 13, 2025 9:17 pm Personally ... I find it MUCH better to create a VM (I use virtualbox ) , and then setup my dev environment there. Not only does this SAVE me from "polluting" my main desktop, but it creates a base for me to work with that wont be polluted BY my main machine.
Thanks so much for your suggestion, I'll do that.
AMD Ryzen 5 Pro 2500U, 16GB, 512 SSD, 1TB HDD, MX23.2
Thanks so much for your comment/suggestion
Michael

atomick

Re: recomendation to create virtual environment in Python with Python 3.12

#4 Post by atomick »

Agree same. MX now has Build-essential installed so installing Virtualbox and creating a snapshot of my host - install then to virtualbox guest is totally a developers joy now you have an exact copy running in VBox
compiling can open a great deal of imagination and learning curve
creating clones of same vbox guest can also improve your desktop working.
If by chance something does go wrong - delete the guest import the clone and back to square-2

so far zlib/openssl/ssh bash vim ease of as well I did install full python.3-12 and had it in its own dedicated with hope to learn python. can do my own in bash fair enough python is good but syntax delimited/oriented/tabulated
fantastic power once onto, lots of code line. Vbox opens value to testing other distro to see how things are done. if so desire.
simply improves choice. never stop learning.

User avatar
michaelbr
Posts: 230
Joined: Thu Dec 05, 2019 4:33 am

Re: recomendation to create virtual environment in Python with Python 3.12

#5 Post by michaelbr »

atomick wrote: Sat Mar 15, 2025 12:36 am Agree same. MX now has Build-essential installed so installing Virtualbox and creating a snapshot of my host - install then to virtualbox guest is totally a developers joy now you have an exact copy running in VBox
compiling can open a great deal of imagination and learning curve
creating clones of same vbox guest can also improve your desktop working.
If by chance something does go wrong - delete the guest import the clone and back to square-2

so far zlib/openssl/ssh bash vim ease of as well I did install full python.3-12 and had it in its own dedicated with hope to learn python. can do my own in bash fair enough python is good but syntax delimited/oriented/tabulated
fantastic power once onto, lots of code line. Vbox opens value to testing other distro to see how things are done. if so desire.
simply improves choice. never stop learning.
Thanks for these tips, I'm in the similar path.
AMD Ryzen 5 Pro 2500U, 16GB, 512 SSD, 1TB HDD, MX23.2
Thanks so much for your comment/suggestion
Michael

Post Reply

Return to “MX Help”