neolee / pilot

进入编程世界的第一课
589 stars 842 forks source link

nteract 在 linux 下的运行问题 #1427

Open hope1324 opened 3 years ago

hope1324 commented 3 years ago

李骏老师你好。 系统:ubuntu 20.04.1 64bit nteract版本linux最新版0.27.0

之前在台式机上kubuntu和旧版的nteract使用正常,不用设置。但现在回了老家用笔记本,新安装了ubuntu 20.04;配置了编程环境。但学习支线课程讲到nteract时出了问题,nteract默认内核是node.js,按照它网站上的说明安装python内核不成功。上网搜了一气也找不到解决方法,请求帮助。

neolee commented 3 years ago

你装 Python 和 Jupyter Lab 正常么?如果 OK 可以不用管 nteract。

hope1324 commented 3 years ago

Python 和 Jupyter Lab 正常。 终端运行: python3 -m ipykernel install [Errno 13] Permission denied: '/usr/local/share/jupyter'

neolee commented 3 years ago

python3 -m ipykernel install 命令需要往 /usr/local/share/jupyter 这个目录下面安装文件,/usr/local 这个目录通常是本地用户可写的,但不知道为啥你的系统里需要 root 权限才行,所以你可以试下:

sudo python3 -m ipykernel install

hope1324 commented 3 years ago

没有 /usr/local/share/jupyter 这个目录,我的jupyter在 /home/bill/anaconda3/share/jupyter/lab 中 我按笑来老师的教程《自学是门手艺》装了anaconda3

hope1324 commented 3 years ago

~/Code/pilot-student$ jupyter lab [I 20:15:17.487 LabApp] JupyterLab extension loaded from /home/bill/anaconda3/lib/python3.7/site-packages/jupyterlab [I 20:15:17.487 LabApp] JupyterLab application directory is /home/bill/anaconda3/share/jupyter/lab

hope1324 commented 3 years ago

折腾了一天,sudo pip3 install jupyterlab 这样安装 jupyterlab ,和 sudo python3 -m ipykernel install 后,成功运行nteract 不知道为什么?

hope1324 commented 3 years ago

终端打命令: pip install jupyterlab 显示: Defaulting to user installation because normal site-packages is not writeable 然后 sudo pip3 install jupyterlab ,和 sudo python3 -m ipykernel install 后,成功运行nteract 。