How to run python scripts and install external python ,R packages

Hi Team,

Question 1.
I am a python/Java developer , Is there a way to run python script files from hue editor.
One way is to use oozie editor but I want another way of doing it.

Question 2.
If I am running R or pyspark program and I have to use some external customer packages/modules how can I install them in Hue interface/API.

#1 The best way is probaly via PySpark and the Livy API

#2 This would depends not on Hue but on the external service used. e.g. Livy enables users to add dependencies when creating session. IIRC this is described in the API.