I'm distributing some python code to inexperienced users who are timid with anything involving command lines. They're okay installing Anaconda and opening Jupyter notebooks, but other than that they've never interacted with Python.
So I went googling around for an easier interface (perhaps GUI) for such a user to be able install local Python packages or Python wheels. I stumbled across the promising-looking pip-gui (https://github.com/GDGVIT/pip-gui), but as of yet it does not install local packages, and would of course require its own installation.
So for Windows users at least I've come across the following solution (based on a script I found online that I can no longer remember). It is a powershell script that uses Windows forms to let the user select a ".whl" file and then install it with pip. It assumes the user has anaconda installed in the default directory (might need some flexibility there).
I have to distribute it as a ".txt" and ask the user to rename to ".ps1" then right click and run with powershell. That's a bit cumbersome, but users seem to be able to do that even if they aren't comfortable using "cd" and "pip" in the cmd shell.
That's the best solution I've got, and I was wondering if maybe there's something simple that I've overlooked.
Add-Type -AssemblyName System.Windows.Forms
$f = new-object Windows.Forms.OpenFileDialog
$f.InitialDirectory = pwd
$f.Filter = "Python Wheel Files (*.whl)|*.whl"
$f.ShowHelp = $true
$f.Multiselect = $false
[void]$f.ShowDialog()
(& ($($Env:HOMEDRIVE)+$($Env:HOMEPATH)+"\anaconda3\Scripts\conda.exe") "shell.powershell" "hook") | Out-String | Invoke-Expression
pip install $f.FileName
Read-Host -Prompt "Press any key to continue"