Having a problem with seaborn python module

Viewed 431

I started today a personal project following a tutorial from here https://nbviewer.jupyter.org/github/savvastj/nbashots/blob/master/tutorial/Tutorial.ipynb
But I already got a problem in the very beginning and I don't know why, it's something related to the modules I guess but I installed all

import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
import nbashots as nba # this will throw a warning if using matplotlib 1.5



curry_id = nba.get_player_id("Curry, Stephen")[0]
curry_id

I run this and got me this error

Traceback (most recent call last):
  File "C:\Users\carlo\Downloads\ye.py", line 2, in <module>
    import seaborn as sns
  File "C:\Users\carlo\AppData\Local\Programs\Python\Python38\lib\site-packages\seaborn\__init__.py", line 5, in <module>
    from .categorical import *
  File "C:\Users\carlo\AppData\Local\Programs\Python\Python38\lib\site-packages\seaborn\categorical.py", line 7, in <module>
    from pandas.core.series import remove_na
ImportError: cannot import name 'remove_na' from 'pandas.core.series' (C:\Users\carlo\AppData\Local\Programs\Python\Python38\lib\site-packages\pandas\core\series.py)
1 Answers

Check what version of Pandas, matplotlib, seaborn is used in the tutorial and what is being used by you. If there is conflict, first make a conda environment with the specific version of the either of the pandas or seaborn.

for example, you can do:

conda create -n myenv python=3.7 scipy=0.15.0 once you activate the environment as conda activate myenv, you can search for conda installation of the packages. It'll check for dependency issues and install the new packages according to the version of python and every other package already installed. So when you'll install new packages, they'll be compatible already to your needs but you need to find the version of either of the packages.

Related