Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python 3.6 Module cannot be found: Folium

I am trying to import folium into a Jupyter notebook I'm working on and I cannot seem to solve the import issues with the Folium library. Has anyone else solved this problem?

!pip install folium
import pandas as pd
import folium

Output from the above yields:

`ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-7-a9938c267a0c> in <module>()
      1 get_ipython().system('pip install folium')
      2 import pandas as pd
----> 3 import folium

ModuleNotFoundError: No module named 'folium'`
like image 597
Tyler Russell Avatar asked Jun 18 '17 16:06

Tyler Russell


People also ask

Is Folium available by default?

Folium is available by default and does not need to be installed. The Folium results are interactive, which makes this library very useful for dashboard building. Folium is a powerful Python library that helps you create several type of Leaflet maps.


2 Answers

It is not available via default conda channel. Try using conda-forge channel to install folium as show below:

conda install -c conda-forge folium
like image 82
ssp Avatar answered Oct 11 '22 23:10

ssp


From the source:

  • Choose the sandbox folder of your choice (~/sandbox for example)

    $ mkdir visualization
    $ cd visualization
    
  • Clone folium from github:

    $ git clone https://github.com/python-visualization/folium
    
  • Run the installation script

    $ cd folium
    $ python setup.py install
    
like image 5
Susma Avatar answered Oct 12 '22 01:10

Susma