juypter笔记本中可以加载osmnx
我无法将OSMNX导入我的Jupyter笔记本(Python版本3.8.8)。我已经运行以下代码:
conda config --prepend channels conda-forge
conda create -n ox --strict-channel-priority osmnx jupyterlab
conda activate ox
python -m ipykernel install --user --name ox --display-name "Python (ox)"
jupyter lab
它只是在新的选项卡中打开新笔记本,而OSMNX仅在该选项卡中使用。我希望能够将OSMNX安装到我已经保存的笔记本中。我在工作选项卡中尝试了这一点
pip install osmnx
,但它给出了错误:
File "<ipython-input-9-8ead41cb7306>", line 3
pip install osmnx
^
SyntaxError: invalid syntax
并
import osmnx as ox
给出错误:
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-11-d4a103aeed40> in <module>
----> 1 import osmnx as ox
ModuleNotFoundError: No module named 'osmnx'
您可能会认为“只使用新标签”,但是新的选项卡非常慢(实际上不正常),我也无法保存它。
有人知道如何成功将OSMNX导入jupyter笔记本电脑吗?
I can't import osmnx into my jupyter notebook (python version 3.8.8). I've run the following code:
conda config --prepend channels conda-forge
conda create -n ox --strict-channel-priority osmnx jupyterlab
conda activate ox
python -m ipykernel install --user --name ox --display-name "Python (ox)"
jupyter lab
Which just opens a new notebook in a new tab and osmnx only works in that tab. I'm looking to be able to install osmnx into my already saved notebook. I tried this in my working tab
pip install osmnx
but it gives the error:
File "<ipython-input-9-8ead41cb7306>", line 3
pip install osmnx
^
SyntaxError: invalid syntax
and
import osmnx as ox
gives the error:
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-11-d4a103aeed40> in <module>
----> 1 import osmnx as ox
ModuleNotFoundError: No module named 'osmnx'
You might think "just use the new tab" but the new tab is incredibly slow (it's practically not functioning) and I can't save it either.
Anyone know how to successfully import osmnx into a jupyter notebook?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论