美文网首页
Jupyter PHP 内核安装以及php zmq (zero

Jupyter PHP 内核安装以及php zmq (zero

作者: 湛青 | 来源:发表于2019-08-15 11:36 被阅读0次

    前提已经安装好python 与 jupyter.

    1. 安装libzmq
      安装包地址提供了linux 各发行版主流的安装包, 以centos6为例
    cd /etc/yum.repos.d/
    wget https://download.opensuse.org/repositories/network:messaging:zeromq:release-stable/CentOS_6/network:messaging:zeromq:release-stable.repo
    yum install zeromq-devel
    
    1. 安装php zmq
      pcel中包含zmq , 所以可以直接以pcel安装 http://pecl.php.net/package/zmq

    $ sudo pecl7 install zmq

    报错 ,错误忘记截图了, 错误消息中就提供了解决方案,再次执行

    $ sudo pecl7 install channel://pecl.php.net/zmq-1.1.3
    到这里php zmq 就安装好了

    1. 安装jupyter php 内核

    wget https://litipk.github.io/Jupyter-PHP-Installer/dist/jupyter-php-installer.phar
    sudo php jupyter-php-installer.phar install

    如果你显示ERROR: Unable to find the composer executable. 可以这么解决

    sudo php jupyter-php-installer.phar install -- /your/path/save/kernal /your/path/composer.phar

    如果看到 The Jupyter-PHP kernel has been successfully installed. 那么恭喜你, 成功了!

    附加的:

    1. jupyter config
    2. jupyter notebook 运行错误 : Could not open input file: /opt/jupyter-php/pkgs/vendor/litipk/jupyter-php/src/kernel.php
      临时解决办法

    sudo mkdir -p /opt/jupyter-php
    sudo ln -s /your/path/save/kernal/pkgs /opt/jupyter-php/

    相关文章

      网友评论

          本文标题:Jupyter PHP 内核安装以及php zmq (zero

          本文链接:https://www.haomeiwen.com/subject/fqiajctx.html