前提已经安装好python 与 jupyter.
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
- 安装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 就安装好了
- 安装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.
那么恭喜你, 成功了!
附加的:
- jupyter config
- 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/
网友评论