Cannot import or install pandas-profiling in Jupyter Notebook

genelaw03 picture genelaw03 · Jun 24, 2019 · Viewed 16.1k times · Source

I have technically already installed pandas-profiling using

pip install pandas-profiling

But when I try to import it, I get the following error:

import numpy as np
import pandas as pd
import pandas_profiling
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-e1a23f2a6f04> in <module>()
  1 import numpy as np
  2 import pandas as pd
  3 import pandas_profiling

  ModuleNotFoundError: No module named 'pandas_profiling'

First Error Image

So I tried installing it in Jupyter Notebook and got the following error as well:

import sys
!{sys.executable} -m pip install pandas-profiling

 Collecting pandas-profiling
 Could not find a version that satisfies the requirement pandas-profiling 
 (from versions: )
 No matching distribution found for pandas-profiling

Second Error Image

I am also unable to install it using conda for both as I am unable to establish a connection to conda.anaconda.org for some reason.

Answer

iPhoneDeveloper picture iPhoneDeveloper · Sep 28, 2019

To others who are looking to resolve this issue try these alternate steps :

  1. Run pip install pandas-profiling command in a separate cell in the jupyter notebook.
  2. After this just restart the kernal and run again. This should definitely work. Worked for me.