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

前提已经安装好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/

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容