当我在我的主目录中工作时尝试导入时,我已经安装了folium并出现此错误:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-af6e4f19ef00> in <module>()
----> 1 import folium
//anaconda/lib/python2.7/site-packages/folium-0.3.0.dev0- py2.7.egg/folium/__init__.py in <module>()
3 from __future__ import absolute_import
4
----> 5 from folium.folium import Map, initialize_notebook, CircleMarker
6
7 from folium.map import (FeatureGroup, FitBounds, Icon, LayerControl, Marker,
//anaconda/lib/python2.7/site-packages/folium-0.3.0.dev0- py2.7.egg/folium/folium.py in <module>()
13 import json
14
---> 15 from branca.colormap import StepColormap
16 from branca.utilities import color_brewer
17 from branca.six import text_type, binary_type
ImportError: No module named branca.colormap
但是,当我转到/Library/Python/2.7/site-packages时,我可以导入它....什么给出了?
答案 0 :(得分:4)
您是否使用Anaconda安装了该软件包?看起来它正在从Anaconda python的软件包安装位置读取软件包。一些事情要尝试:
conda install branca
pip install branca