Distributing Python software to non-technical users is too hard. We need to make it simpler.
I'm imagining a tool based on conda.
Ideally I'd like to have something like this:
- I write an
environment.yml
file with the conda/pip dependencies for my software - I write an
installer.yml
file that describes my installer: package name, paths to logo/images, icon shortcuts for binaries, etc. - I type
build-installer
and a few files are created:mypackage.sh
: for Unix systemsmypackage.dmg
: for OS Xmypackage.exe
: for Windowsmypackage.deb
: for Debian
When executed by the clients, these installers all do the same thing under the hood:
- download the latest miniconda and install it in the install directory chosen by the user
- create an env using
environment.yml
- put both
miniconda/bin
andminiconda/envs/myenv/bin
in the system path (if the user has checked that box during the installation process) - create the shortcuts
There could also be an Update shortcut that does conda update ...
where the list of packages to update is specified in install.yml
constructor does something like this. However, it prebuilds the environment, whereas I'd prefer to have it built when the user installs the software (which requires a live Internet connection).
I've been working on this problem with distributing internal company python tools. Biggest issue has consistently been getting all the dependencies in order when installing on a new machine. My solution so far has been to build a dedicated conda environment with all necessary dependencies for an application and export it as a yml that gets version controlled in that project's/application's git repo. Then to install on a new machine, you just install conda and git, clone the repo, and create the environment from the yml.
Next step is to handle all the conda CLI stuff for the user (preferably with a gui) and make it cross platform (easier said than done), but using conda to keep track of dependencies for an application like this definitely simplifies a lot of the install process.