我使用以下代码通过conda下载了osmnx:
conda config --prepend channels conda-forge
conda create -n ox --strict-channel-priority osmnx这来自osmnx文档:https://osmnx.readthedocs.io/en/stable/
我可以看到模块已经下载了,因为在Anaconda提示符中,我可以输入conda activate ox,并且它可以工作。然而,当我进入我的jupyter笔记本和键入
import osmnx as ox我得到以下错误:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-11-7e05e48535cd> in <module>
----> 1 import osmnx as ox
2
3
ModuleNotFoundError: No module named 'osmnx'请告诉我能做些什么。谢谢
发布于 2020-06-03 19:02:33
在您的终端中,运行:
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和JupyterLab安装到名为ox的conda环境中,激活环境,在环境中安装ipython 内核,然后启动JupyterLab。
另请参阅
https://stackoverflow.com/questions/59603695
复制相似问题