In the code snippet above, the required modules for my project are pygame and cryptography. So in each script, you can add the lines dependencies('pip3') (for macOS users) and/or dependences('pip') (for Windows users). Make sure to modify the dependencies() function to include all the modules you need.
There are many variations, you could also have the code check if the user has the dependencies (modules) installed. If they don't, install it for them. macOS requires pip3, it'll say pip is not a valid command, the same way it does for python.
I think installing the dependent modules from the scripts would improve the UX by removing another step for them.
I noticed that a lot of the scripts require the user to install a module or more (obviously!).
Instead of having the user install each module required for each script, why not install these modules FROM the script itself?
I have an example of this over at my ArkEngine repository. The code is here:
In the code snippet above, the required modules for my project are
pygame
andcryptography
. So in each script, you can add the linesdependencies('pip3')
(for macOS users) and/ordependences('pip')
(for Windows users). Make sure to modify thedependencies()
function to include all the modules you need.There are many variations, you could also have the code check if the user has the dependencies (modules) installed. If they don't, install it for them. macOS requires
pip3
, it'll saypip is not a valid command
, the same way it does forpython
.I think installing the dependent modules from the scripts would improve the UX by removing another step for them.