简体   繁体   English

运行 Lux 库时出现问题 - Jupyter Notebooks

[英]Problem running the Lux library - Jupyter Notebooks

I'm having trouble running the Lux library on my Notebook.我在笔记本上运行 Lux 库时遇到问题。

I've tried following the instructions on their README file and looked for answers on Stack, nothing.我已经尝试按照他们的 README 文件中的说明进行操作,并在 Stack 上寻找答案,但一无所获。

Here are my inputs and outputs:这是我的输入和输出:

Input 1:输入 1:

!pip install lux-api
!jupyter labextension install @jupyter-widgets/jupyterlab-manager
!jupyter labextension install luxwidget

Output 1:输出 1:

Building jupyterlab assets (production, minimized)
Building jupyterlab assets (production, minimized)

Input 2:输入 2:

!jupyter nbextension install --py luxwidget
!jupyter nbextension enable --py luxwidget

Output 2:输出 2:

Installing (...) 
Traceback (...) 
PermissionError: [Errno 13] Permission denied: '/usr/local/share/jupyter'
Enabling notebook extension luxwidget/extension...
      - Validating: problems found:
        - require?  X luxwidget/extension

Input 3:输入 3:

from pydataset import data
import pandas as pd
import lux

Input 4:输入 4:

df = data('iris')
df

Output 4:输出 4:

Data table数据表

Empty output after pressing the toggle button按下切换按钮后的空输出

Ps: I have Node.JS installed on my Mac. Ps:我的 Mac 上安装了 Node.JS。

It seems that lux rely on '/usr/local/share/jupyter' folder. lux 似乎依赖于“/usr/local/share/jupyter”文件夹。

My solution was to create a new folder with我的解决方案是创建一个新文件夹

sudo mkdir /usr/loca/share/jupyter

After, I changed the permissions with之后,我更改了权限

sudo chmod 777 /usr/loca/share/jupyter

For me, there is not a problem to give access to this folder to other users.对我来说,让其他用户访问这个文件夹没有问题。

After this, I executed the following two commands:在此之后,我执行了以下两个命令:

jupyter nbextension install --py luxwidget
jupyter nbextension enable --py luxwidget

If you used with conda , you want to execute如果与conda 一起使用,则要执行

jupyter labextension install @jupyter-widgets/jupyterlab-manager
jupyter labextension install luxwidget

Some information was extracted from Lux一些信息是从Lux中提取的

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM