jupyterlab / plotly-extension无法安装

时间:2018-07-10 13:53:49

标签: plotly jupyter-lab

Jupyterlab 0.31.8
Ubuntu 14.04
密谋3.0.0

我正在尝试安装Plotly jupyterlab扩展。

运行jupyter labextension install @jupyterlab/plotly-extension --debug会导致

> /usr/bin/npm pack @jupyterlab/plotly-extension
npm ERR! git clone git@github.com:jupyterlab/plotly-extension Cloning into bare repository '/home/ubuntu/.npm/_git-remotes/git-github-com-jupyterlab-plotly-extension-8ab9f472'...
npm ERR! git clone git@github.com:jupyterlab/plotly-extension Permission denied (publickey).
npm ERR! git clone git@github.com:jupyterlab/plotly-extension fatal: Could not read from remote repository.
npm ERR! git clone git@github.com:jupyterlab/plotly-extension
npm ERR! git clone git@github.com:jupyterlab/plotly-extension Please make sure you have the correct access rights
npm ERR! git clone git@github.com:jupyterlab/plotly-extension and the repository exists.
npm ERR! addLocal Could not install jupyterlab/plotly-extension
npm ERR! Error: ENOENT, stat 'jupyterlab/plotly-extension'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Linux 3.13.0-144-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "pack" "@jupyterlab/plotly-extension"
npm ERR! cwd /tmp/tmp0ce5jqp6
npm ERR! node -v v0.10.37
npm ERR! npm -v 1.4.28
npm ERR! path jupyterlab/plotly-extension
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /tmp/tmp0ce5jqp6/npm-debug.log
npm ERR! not ok code 0
Traceback (most recent call last):

  File "/usr/local/anaconda3/lib/python3.5/site-packages/jupyterlab/labextensions.py", line 71, in start
ans = self.run_task()

  File "/usr/local/anaconda3/lib/python3.5/site-packages/jupyterlab/labextensions.py", line 100, in run_task
for arg in self.extra_args

  File "/usr/local/anaconda3/lib/python3.5/site-packages/jupyterlab/labextensions.py", line 100, in <listcomp>
for arg in self.extra_args

  File "/usr/local/anaconda3/lib/python3.5/site-packages/jupyterlab/commands.py", line 210, in install_extension
return handler.install_extension(extension)

  File "/usr/local/anaconda3/lib/python3.5/site-packages/jupyterlab/commands.py", line 347, in install_extension
info = self._install_extension(extension, tempdir)

  File "/usr/local/anaconda3/lib/python3.5/site-packages/jupyterlab/commands.py", line 1095, in _install_extension
info = self._extract_package(extension, tempdir)

  File "/usr/local/anaconda3/lib/python3.5/site-packages/jupyterlab/commands.py", line 1135, in _extract_package
raise ValueError(msg % source)

ValueError: "@jupyterlab/plotly-extension" is not a valid npm package


Errored, use --debug for full output:
ValueError: "@jupyterlab/plotly-extension" is not a valid npm package

我尝试过的是这里https://github.com/jupyterlab/jupyter-renderers/tree/master/packages/plotly-extension

的标准建议

我该怎么做?

2 个答案:

答案 0 :(得分:0)

尝试了很多东西后,我开始工作了。我的猜测是,这两件事中的一项(或两项)是使其起作用的原因:

1)升级到Jupyterlab 0.34.12

2)使用以下两行安装nodejs:

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - && \
apt-get install -y nodejs

答案 1 :(得分:0)

尽管答案是可以接受的,但是如果仍然存在任何问题并且在代理连接后仍然存在,请尝试在npm config中设置代理。
例子->

npm config set http-proxy=""
npm config set https-proxy=""