2

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)
deceze
  • 510,633
  • 85
  • 743
  • 889
Carlos
  • 33
  • 8
  • Maybe ckeck the pandas version you have installed. – kubatucka Jun 29 '20 at 12:20
  • What do I have to check? I installed eveything separately – Carlos Jun 29 '20 at 13:00
  • From what i understands seaborn tries to import something from pandas but can't find it. https://stackoverflow.com/questions/60486125/i-am-facing-this-issue-in-seaborn-import This suggest reinstalling with pip3. – kubatucka Jun 29 '20 at 13:18
  • https://stackoverflow.com/questions/60486125/i-am-facing-this-issue-in-seaborn-import – Adelin Jul 01 '20 at 04:08

1 Answers1

0

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.

Deshwal
  • 3,436
  • 4
  • 35
  • 94