我在JupyterLab中使用控制台和文本编辑器,并将文本编辑器键映射设置为'vim',我可以在插入模式下编辑文本.但是当尝试使用'esc'键退出插入模式时,我只是从当前窗口切换出来.这不是退出插入模式的方法吗?
我正在尝试将Jupyter实验室停靠,因此我尝试创建Dockerfile如下所示,
FROM python:3.6
WORKDIR /jup
RUN pip install jupyter -U && pip install jupyterlab
EXPOSE 8888
ENTRYPOINT ["jupyter", "lab"]
Run Code Online (Sandbox Code Playgroud)
和运行命令,docker build . -t jupyter然后docker run jupyter.但遗憾的是我收到了一些错误,如下所示
[I 07:56:34.123 LabApp] Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret
Traceback (most recent call last):
File "/usr/local/bin/jupyter-lab", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/jupyter_core/application.py", line 266, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/usr/local/lib/python3.6/site-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "<decorator-gen-7>", line 2, in initialize
File …Run Code Online (Sandbox Code Playgroud) 以下代码不会在 Jupyter 实验室中呈现:
%matplotlib widget
import plotly.express as px
import numpy as np
import pandas as pd
df = pd.DataFrame(np.random.randint(0,100,size=(5, 4)), columns=list('ABCD'))
px.bar(df, x='A', y='B')
Run Code Online (Sandbox Code Playgroud)
我试图安装这里提到的所有依赖项和扩展
https://plot.ly/python/getting-started/#jupyterlab-support-python-35
还有这里的步骤 https://github.com/matplotlib/jupyter-matplotlib
没有任何效果
这是我的设置:
jupyter lab --version
1.0.2
python --version
Python 3.6.1 :: Continuum Analytics, Inc.
conda list jupyterlab
# packages in environment at C:\Users\***\Anaconda3:
#
# Name Version Build Channel
jupyterlab 1.0.2 py36hf63ae98_0
jupyterlab_launcher 0.13.1 py36_0
jupyterlab_server 1.0.0 py_0
conda list nodejs
# packages in environment at C:\Users\***\Anaconda3:
#
# Name Version …Run Code Online (Sandbox Code Playgroud) 我最近开始使用Jupyter Lab,但我的问题是我要处理非常大的数据集(通常,数据集本身大约是计算机RAM的1/4)。经过几次转换后,另存为新的Python对象,我倾向于耗尽内存。问题是,当我接近可用的RAM限制并执行需要另一个RAM空间的任何操作时,计算机将冻结,而修复它的唯一方法是重新启动它。这是Jupyter Lab / Notebook中的默认行为,还是我应该设置的某些设置?通常,我希望程序崩溃(例如在RStudio中),而不是整个计算机
我删除了 Anaconda,因为它造成的问题比与其他编辑器(如 Sublime、PyCharm 等)一起解决的问题要多……
在课堂上,我们有很多 Jupyter 笔记本。有没有一个程序可以让我像 Anaconda 允许的那样运行 Jupyter Notebooks?与 Cntrl + Enter 运行块代码的用户界面基本相同?
谢谢。
编辑:我想通了。我需要将 Python 从 3.8 降级到 3.7
背景:我是 Python 世界的新手,正在使用 Plotly 在 Python 中创建基本图形。我使用 AWS Sagemaker 的 JupyterLab 来创建 python 脚本。
问题:我一直在尝试运行 Plotly 网站上提到的基本代码,但即使这些代码也返回空白图表。
我自己尝试的问题解决:
pip安装plotly版本4.6.0
https://plotly.com/python/getting-started/上提到的 JupyterLab 支持步骤已经执行
代码示例:
import plotly.graph_objects as go
fig = go.Figure(data=go.Bar(y=[2, 3, 1]))
fig.show()
Run Code Online (Sandbox Code Playgroud) machine-learning plotly jupyter-lab amazon-sagemaker plotly-python
!pip install sentinelsat
!pip install geopandas
!pip install folium
from sentinelsat import SentinelAPI
user = '****'
password = '****'
api = SentinelAPI(user, password, 'https://scihub.copernicus.eu/dhus')
import geopandas as gpd
import folium
nReserve = gpd.read_file(r"G:\New folder (2)\cardinialres.shp")
m = folium.Map([-37.971389, 145.418889], zoom_start=12)
folium.GeoJson(nReserve).add_to(m)
m
Run Code Online (Sandbox Code Playgroud)
''我用谷歌搜索,发现我需要使用SHAPE_RESTORE_SHX=YES fio info myshapefile.shp,但不知道在 Jupiter 实验室的哪里使用。
我打开终端。
jupyter labextension install @jupyterlab/github
An error occured.
ValueError: Please install nodejs >=10.0.0 before continuing. nodejs may be installed using conda or directly from the nodejs website.
See the log file for details
Run Code Online (Sandbox Code Playgroud)
然而:
node -v
v14.5.0
发生了什么,我如何让 conda 找到我的节点?
我使用原始 Jupyter 笔记本 Web 界面编写了一些 Jupyter 笔记本。所有笔记本都以这种方式很好地同步。
但现在,我想在 VSCode 中编辑我的笔记本。但我无法配置笔记本文件与其 python 脚本的同步。
我用 jupytext 尝试过:
jupytext在文件夹中创建文件~/.config# Always pair ipynb notebooks to py:percent files
default_jupytext_formats = "ipynb,py:percent"
Run Code Online (Sandbox Code Playgroud)
但没有效果!
(更新)作为第一个解决方案,使用VSCode 任务(我还没有使用任务)可以实现这一点吗?
如果打开/保存/修改笔记本文件,是否可以使用jupytext命令运行任务?
jupyter-lab ×10
python ×4
plotly ×2
anaconda3 ×1
docker ×1
dockerfile ×1
gdal ×1
node.js ×1
python-3.x ×1
shapefile ×1