Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13599#discussion_r160072684
  
    --- Diff: python/pyspark/context.py ---
    @@ -1023,6 +1039,33 @@ def getConf(self):
             conf.setAll(self._conf.getAll())
             return conf
     
    +    def install_packages(self, packages, install_driver=True):
    +        """
    +        install python packages on all executors and driver through pip
    +        :param packages: string for single package or a list of string for 
multiple packages
    +        :param install_driver: whether to install packages in client
    +        """
    +        if self._conf.get("spark.pyspark.virtualenv.enabled") != "true":
    +            raise Exception("install_packages can only use called when "
    --- End diff --
    
    How about `Exception` -> `RuntimeError`?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to