You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@zeppelin.apache.org by "Partridge, Lucas (GE Aviation)" <Lu...@ge.com> on 2017/02/07 10:02:42 UTC
How can I install Python packages from within a Zeppelin notebook?
The docs<https://zeppelin.apache.org/docs/0.7.0/interpreter/python.html#default> for the Python interpreter say: "The interpreter can use all modules already installed (with pip, easy_install...)". For example, on my own personal Zeppelin installation I can access the hdfs package by running sudo -E pip install hdfs in a terminal.
But how can I import a package such as hdfs when I'm running on someone else's Zeppelin installation and can't login to a terminal on the system hosting Zeppelin? At the moment it appears I have to lobby the sysadmin for Zeppelin to run pip install for me. Ideally I could run some command in a notebook to make an arbitrary Python package available to me. Or is this prevented by design to stop different users clashing with each other on a multi-user system? Thanks.
Re: How can I install Python packages from within a Zeppelin notebook?
Posted by moon soo Lee <mo...@apache.org>.
If you have Conda environment, you can try use %python.conda interpreter
included in 0.7.0.
http://zeppelin.apache.org/docs/0.7.0/interpreter/python.html#conda
Features are not fully documented on website, but if you just run
"%python.conda help" it'll print full features.
%python.conda interpreter allows create/switch conda environment and
install/uninstall packages in it.
Hope this helps.
Best,
moon
On Tue, Feb 7, 2017 at 7:03 PM Partridge, Lucas (GE Aviation) <
Lucas.Partridge@ge.com> wrote:
> The docs
> <https://zeppelin.apache.org/docs/0.7.0/interpreter/python.html#default>
> for the Python interpreter say: “The interpreter can use all modules *
> already installed* (with pip, easy_install...)”. For example, on my own
> personal Zeppelin installation I can access the hdfs package by running *sudo
> –E pip install hdfs* in a terminal.
>
>
>
> But how can I import a package such as hdfs when I’m running on someone
> else’s Zeppelin installation and can’t login to a terminal on the system
> hosting Zeppelin? At the moment it appears I have to lobby the sysadmin for
> Zeppelin to run *pip install* for me. Ideally I could run some command in
> a notebook to make an arbitrary Python package available to me. Or is this
> prevented by design to stop different users clashing with each other on a
> multi-user system? Thanks.
>