Skip to content

2025

Installing Python on WSL2 (Ubuntu)

Install build tools and required Python libraries

Install build tools and required Python libraries
sudo apt update && sudo apt install -y build-essential git libexpat1-dev libssl-dev zlib1g-dev \
libncurses5-dev libbz2-dev liblzma-dev \
libsqlite3-dev libffi-dev tcl-dev linux-headers-generic libgdbm-dev \
libreadline-dev tk tk-dev

Install pyenv

Install pyenv
curl https://pyenv.run | bash

Update ~/.bashrc, ~/.profile, ~/.bash_profile (read instructions from previous output)

~/.bashrc
...

# Load pyenv automatically by adding
# the following to ~/.bashrc:

export PATH="/home/{USERNAME}/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
~/.profile
# Load pyenv automatically by appending
# the following to
# ~/.bash_profile if it exists, otherwise ~/.profile (for login shells)
# and ~/.bashrc (for interactive shells) :

export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init - bash)"

Install Python "common" libraries

Install needed version(s) ... can install multiple versions
# list available python versions
# pyenv install --list
pyenv install 3.14.2

Install / Upgrade base libraries for installed Python version(s)

Install / Upgrade base libraries into installed version(s) of Python
pyenv global 3.14.2
pip install pip --upgrade
pip install pipenv

Creating Cloud Image Template on Proxmox

  • Follow commands below for Rocky Linux and Ubuntu cloud images.
  • Once template is created, VMs can be cloned from the template.
1. Preparations
Connect to PVE
ssh pve

List storage pools - we will be using vm_ct
pvesm status
output
Name                        Type     Status     Total (KiB)      Used (KiB) Available (KiB)        %
local                        dir     active        70892712        10550868        56694972   14.88%
local-lvm                lvmthin     active       147714048               0       147714048    0.00%
vm_ct                    lvmthin     active       957100032       471754605       485345426   49.29%

List configured networks - we will be using vmbr0
brctl show
output
bridge name     bridge id               STP enabled     interfaces
fwbr30040i0     8000.7ef38b20b3aa       no              fwln30040i0
                                                        tap30040i0
fwbr30080i0     8000.2ed716ece7b9       no              fwln30080i0
                                                        tap30080i0
vmbr0           8000.705a0f4343e0       no              fwpr30040p0
                                                        fwpr30080p0
                                                        nic0
2. Get Cloud Image
Latest images at https://dl.rockylinux.org/pub/rocky
wget https://dl.rockylinux.org/pub/rocky/10/images/x86_64/Rocky-10-GenericCloud-Base.latest.x86_64.qcow2
Latest images at https://cloud-images.ubuntu.com/releases
wget https://cloud-images.ubuntu.com/releases/noble/release/ubuntu-24.04-server-cloudimg-amd64.img
3. Create new VM with 4 GB (4096 MB) RAM on storage vm_ct with vmbr0 bridge
VM ID: 8001, name: rocky-cloud; CPU: host (did not work with default kvm64)
qm create 8001 --memory 4096 --name rocky-cloud --cores 2 --sockets 2 --cpu host --net0 virtio,bridge=vmbr0
VM ID: 8002, name: ubuntu-cloud, CPU: can leave default kvm64
qm create 8002 --memory 4096 --name ubuntu-cloud --cores 2 --sockets 2 --cpu kvm64 --net0 virtio,bridge=vmbr0
4. Import downloaded image to newly created VM
VM ID: 8001, Downloaded disk: Rocky-10-GenericCloud-Base.latest.x86_64.qcow2, Storage: vm_ct
qm importdisk 8001 Rocky-10-GenericCloud-Base.latest.x86_64.qcow2 vm_ct
output
... successfully imported disk 'vm_ct:vm-8001-disk-0'

VM ID: 8002, Downloaded disk: ubuntu-24.04-server-cloudimg-amd64.img, Storage: vm_ct
qm importdisk 8002 ubuntu-24.04-server-cloudimg-amd64.img vm_ct
output
... successfully imported disk 'vm_ct:vm-8002-disk-0'

5. Attach imprted disk to VM
VM ID: 8001, Storage: vm_ct, Disk: vm-8001-disk-0
qm set 8001 --scsihw virtio-scsi-pci --scsi0 vm_ct:vm-8001-disk-0
output
update VM 8001: -scsi0 vm_ct:vm-8001-disk-0 -scsihw virtio-scsi-pci
VM ID: 8002, Storage: vm_ct, Disk: vm-8002-disk-0
qm set 8001 --scsihw virtio-scsi-pci --scsi0 vm_ct:vm-8002-disk-0
output
update VM 8002: -scsi0 vm_ct:vm-8002-disk-0 -scsihw virtio-scsi-pci
6. Attach logical volume cloudinit drive to the new VM
VM ID: 8001, Storage: vm_ct, Disk: cloudinit
qm set 8001 --ide2 vm_ct:cloudinit
output
update VM 8001: -ide2 vm_ct:cloudinit
  Logical volume "vm-8001-cloudinit" created.
  Logical volume vm_ct/vm-8001-cloudinit changed.
ide2: successfully created disk 'vm_ct:vm-8001-cloudinit,media=cdrom'
generating cloud-init ISO
VM ID: 8002, Storage: vm_ct, Disk: cloudinit
qm set 8002 --ide2 vm_ct:cloudinit
output
update VM 8002: -ide2 vm_ct:cloudinit
  Logical volume "vm-8002-cloudinit" created.
  Logical volume vm_ct/vm-8002-cloudinit changed.
ide2: successfully created disk 'vm_ct:vm-8002-cloudinit,media=cdrom'
generating cloud-init ISO
7. Set to Boot from cloudinit
VM ID: 8001
qm set 8001 --boot c --bootdisk scsi0
output
update VM 8001: -boot c -bootdisk scsi0
VM ID: 8002
qm set 8002 --boot c --bootdisk scsi0
output
update VM 8002: -boot c -bootdisk scsi0
8. Enable serial console for use with Web VNC within Proxmox
VM ID: 8001
qm set 8001 --serial0 socket --vga serial0
output
output: update VM 8001: -serial0 socket -vga serial0
VM ID: 8002
qm set 8002 --serial0 socket --vga serial0
output
output: update VM 8002: -serial0 socket -vga serial0
9. Set defaults from Proxmox (PVE) GUI
  • User:
  • Password:
  • DNS domain: (uses host settings by default)
  • DNS servers: (uses host settings by default)
  • SSH public key:
  • IP Config (net0): (make sure to select DHCP for IPv4 or provide Static value)

10. DO NOT START THIS VM to preserve clean machine id, etc.

11. At this point, if needed, Processors and Memory can be changed as needed.

12. Right-Click and Convert to Template

Ms Word Merge Print Preview Problem

Word for Windows with Merge Fields and problem during Print Preview

Word for Windows with Merge Fields and problem during Print Preview

ISSUE:

Document merges normally and shows all the fields. When CTRL-P is pressed for Print Preview, the footer fields are shown as Merge Fields (not replaced).

FIX:

  • Edit Word Template
  • Select all footer fields
  • Press CTRL-F11 to lock them

This seems to be fixing the issue.

MORE INFO:

Word Shortcuts

Ms Excel Column Name to Number Converter

Formula for converting Excel Column Number to Column Name (Column Number specified in B1):

=SUBSTITUTE(ADDRESS(2, B1, 4), "2", "")

Formula for converting Excel Column Name to Column Number (Column Name specified in B2):

=COLUMN(INDIRECT(B2&"1"))

Screenshot