Working with Python Scripts in a custom activity

I have to create a custom activity which has dependency on a python script.
Is it possible make it happen?
If yes how should I go ahead?
While someone installs the package, should that individual also should install all the dependent packages involved in the python script?