Seaborn breaks Pandas

668
4
11-26-2021 06:44 AM
ChristopherBater
New Contributor

Hi, I'm using Pro 2.8.2 and Spyder 5 as my IDE. Adding Seaborn to a cloned environment breaks Pandas. When I try to import Pandas I get an error (see below); importing Seaborn causes a similar error. Any thoughts?

Thanks,

Chris

In [1]: import pandas
Traceback (most recent call last):

File "<ipython-input-1-38d4b0363d82>", line 1, in <module>
import pandas

File "C:\Users\user.name\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone1\lib\site-packages\pandas\__init__.py", line 22, in <module>
from pandas.compat import (

File "C:\Users\user.name\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone1\lib\site-packages\pandas\compat\__init__.py", line 23, in <module>
from pandas.compat.pyarrow import (

File "C:\Users\user.name\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone1\lib\site-packages\pandas\compat\pyarrow.py", line 9, in <module>
_palv = Version(_pa_version)

File "C:\Users\user.name\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone1\lib\site-packages\pandas\util\version\__init__.py", line 339, in __init__
match = self._regex.search(version)

TypeError: expected string or bytes-like object

0 Kudos
4 Replies
DanPatterson
MVP Esteemed Contributor

What are the specific installed versions of  matplotlib, pandas and pyarrow?  and what version of seaborn are you trying to use?  There may be a version conflict.  Also, you didn't use pip anywhere during the install process did you?


... sort of retired...
0 Kudos
DanPatterson
MVP Esteemed Contributor

Without seaborn installed, here are the packages and versions

 

# Name                    Version                   Build  Channel
freetype                  2.10.4                   vc14_3  [vc14]  esri

(arcgispro-py3) C:\arc_pro\bin\Python\envs\arcgispro-py3>conda list matplotlib
# packages in environment at C:\arc_pro\bin\Python\envs\arcgispro-py3:
#
# Name                    Version                   Build  Channel
matplotlib                3.4.2           py37_arcgispro_1  [arcgispro]  esri

(arcgispro-py3) C:\arc_pro\bin\Python\envs\arcgispro-py3>conda list pandas
# packages in environment at C:\arc_pro\bin\Python\envs\arcgispro-py3:
#
# Name                    Version                   Build  Channel
pandas                    1.3.4            py37h6214cd6_0

(arcgispro-py3) C:\arc_pro\bin\Python\envs\arcgispro-py3>conda list spyder
# packages in environment at C:\arc_pro\bin\Python\envs\arcgispro-py3:
#
# Name                    Version                   Build  Channel
pyls-spyder               0.4.0              pyhd3eb1b0_0
spyder                    5.1.5            py37haa95532_1
spyder-kernels            2.1.3            py37haa95532_0

(arcgispro-py3) C:\arc_pro\bin\Python\envs\arcgispro-py3>

and here is what it wants to install

(arcgispro-py3) C:\arc_pro\bin\Python\envs\arcgispro-py3>conda install seaborn --dry-run
Collecting package metadata (current_repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: C:\arc_pro\bin\Python\envs\arcgispro-py3

  added / updated specs:
    - seaborn


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    seaborn-0.11.2             |     pyhd3eb1b0_0         218 KB
    ------------------------------------------------------------
                                           Total:         218 KB

The following NEW packages will be INSTALLED:

  seaborn            pkgs/main/noarch::seaborn-0.11.2-pyhd3eb1b0_0



DryRunExit: Dry run. Exiting.

 


... sort of retired...
0 Kudos
ChristopherBater
New Contributor

Hi Dan, I installed Seaborn using Pro's Python package manager (ie not using Conda' command prompt). As requested, see below, and thanks for your time!

Without Seaborn
# Name   	Version Build Channel
matplotlib 	3.3.1 	py37_arcgispro_0 [arcgispro] esri
pandas      	1.2.3   py37hf11a4ad_0
pyarrow     	1.0.1   1    esri
pyls-spyder	0.4.0       pyhd3eb1b0_0
spyder		5.1.5       py37haa95532_1
spyder-kernels	2.1.3       py37haa95532_0

With Seaborn
# Name   	Version     Build Channel
matplotlib      3.3.1       py37_arcgispro_0  [arcgispro]  esri
pandas          1.3.4       py37h6214cd6_0
pyarrow         1.0.1       1    esri
pyls-spyder     0.4.0       pyhd3eb1b0_0
seaborn         0.11.2      pyhd3eb1b0_0
spyder          5.1.5       py37haa95532_1
spyder-kernels  2.1.3       py37haa95532_0

 

0 Kudos
DanPatterson
MVP Esteemed Contributor

I have matplotlib 3.4.2 yours is 3.3.1, I haven't installed Seaborn in a while, but the version is different and you will only find out if it should update is you use conda


... sort of retired...
0 Kudos