Importing proplot package throws error in Jupyter Notebook but not in Python or iPython
dr-david-jansing opened this issue · comments
Dave Jansing commented
Description
Importing proplot
package throws AttributeError in Jupyter Notebook, but not in iPython
Steps to reproduce
import cv2
import proplot as pplt
Expected behavior: Loaded library for use
Actual behavior:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In [1], line 2
1 import cv2
----> 2 import proplot as pplt
File ~/miniconda3/envs/opencv/lib/python3.9/site-packages/proplot/__init__.py:30
28 # Import everything to top level
29 with _benchmark('config'):
---> 30 from .config import * # noqa: F401 F403
31 with _benchmark('crs'):
32 from .crs import * # noqa: F401 F403
File ~/miniconda3/envs/opencv/lib/python3.9/site-packages/proplot/config.py:1518
1514 rc_proplot = rcsetup._rc_proplot_default.copy() # a validated rcParams-style dict
1516 #: Instance of `Configurator`. This controls both `rc_matplotlib` and `rc_proplot`
1517 #: settings. See the :ref:`configuration guide <ug_config>` for details.
-> 1518 rc = Configurator(skip_cycle=True)
1520 # Deprecated
1521 RcConfigurator = warnings._rename_objs(
1522 '0.8', RcConfigurator=Configurator,
1523 )
File ~/miniconda3/envs/opencv/lib/python3.9/site-packages/proplot/config.py:718, in Configurator.__init__(self, local, user, default, **kwargs)
712 """
...
165 ]), key=lambda x: x.__class__.__name__)
166 classnames = [ c.__class__.__name__ for c in configurables ]
168 line = s.strip()
AttributeError: type object 'CommManager' has no attribute 'class_traits'
Equivalent steps in matplotlib
N/A
Environment
# packages in environment at /Users/jansied1/miniconda3/envs/opencv:
#
# Name Version Build Channel
aom 3.5.0 hf0c8a7f_0 conda-forge
appnope 0.1.3 pyhd8ed1ab_0 conda-forge
asttokens 2.1.0 pyhd8ed1ab_0 conda-forge
backcall 0.2.0 pyh9f0ad1d_0 conda-forge
backports 1.0 pyhd8ed1ab_3 conda-forge
backports.functools_lru_cache 1.6.4 pyhd8ed1ab_0 conda-forge
bzip2 1.0.8 h0d85af4_4 conda-forge
c-ares 1.18.1 h0d85af4_0 conda-forge
ca-certificates 2022.9.24 h033912b_0 conda-forge
cairo 1.16.0 h904041c_1014 conda-forge
certifi 2022.9.24 pyhd8ed1ab_0 conda-forge
comm 0.1.1 pyhd8ed1ab_0 conda-forge
cycler 0.11.0 pyhd8ed1ab_0 conda-forge
debugpy 1.6.3 py39h7a8716b_1 conda-forge
decorator 5.1.1 pyhd8ed1ab_0 conda-forge
entrypoints 0.4 pyhd8ed1ab_0 conda-forge
executing 1.2.0 pyhd8ed1ab_0 conda-forge
expat 2.5.0 hf0c8a7f_0 conda-forge
ffmpeg 5.1.2 gpl_h1c50e5d_103 conda-forge
font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge
font-ttf-inconsolata 3.000 h77eed37_0 conda-forge
font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge
font-ttf-ubuntu 0.83 hab24e00_0 conda-forge
fontconfig 2.14.1 h5bb23bf_0 conda-forge
fonts-conda-ecosystem 1 0 conda-forge
fonts-conda-forge 1 0 conda-forge
freetype 2.12.1 h3f81eb7_1 conda-forge
gettext 0.21.1 h8a4c099_0 conda-forge
gmp 6.2.1 h2e338ed_0 conda-forge
gnutls 3.7.8 h207c4f0_0 conda-forge
graphite2 1.3.13 h2e338ed_1001 conda-forge
harfbuzz 5.3.0 h08f8713_0 conda-forge
hdf5 1.12.2 nompi_h1f71328_100 conda-forge
icu 70.1 h96cf925_0 conda-forge
ipykernel 6.18.1 pyh736e0ef_0 conda-forge
ipython 8.6.0 pyhd1c38e8_1 conda-forge
jasper 2.0.33 h013e400_0 conda-forge
jedi 0.18.2 pyhd8ed1ab_0 conda-forge
jpeg 9e hac89ed1_2 conda-forge
jupyter_client 7.4.7 pyhd8ed1ab_0 conda-forge
jupyter_core 5.0.0 py39h6e9494a_0 conda-forge
kiwisolver 1.4.4 py39h92daf61_1 conda-forge
krb5 1.19.3 hb98e516_0 conda-forge
lame 3.100 hb7f2c08_1003 conda-forge
lcms2 2.14 h90f4b2a_0 conda-forge
lerc 4.0.0 hb486fe8_0 conda-forge
libblas 3.9.0 16_osx64_openblas conda-forge
libcblas 3.9.0 16_osx64_openblas conda-forge
libcurl 7.86.0 h581aaea_1 conda-forge
libcxx 14.0.6 hccf4f1f_0 conda-forge
libdeflate 1.14 hb7f2c08_0 conda-forge
libedit 3.1.20191231 h0678c8f_2 conda-forge
libev 4.33 haf1e3a3_1 conda-forge
libffi 3.4.2 h0d85af4_5 conda-forge
libgfortran 5.0.0 9_5_0_h97931a8_26 conda-forge
libgfortran5 11.3.0 h082f757_26 conda-forge
libglib 2.74.1 h4c723e1_1 conda-forge
libiconv 1.17 hac89ed1_0 conda-forge
libidn2 2.3.4 hb7f2c08_0 conda-forge
liblapack 3.9.0 16_osx64_openblas conda-forge
liblapacke 3.9.0 16_osx64_openblas conda-forge
libnghttp2 1.47.0 h5aae05b_1 conda-forge
libopenblas 0.3.21 openmp_h429af6e_3 conda-forge
libopencv 4.6.0 py39hc4816b1_6 conda-forge
libpng 1.6.39 ha978bb4_0 conda-forge
libprotobuf 3.21.9 hbc0c0cd_0 conda-forge
libsodium 1.0.18 hbcb3906_1 conda-forge
libsqlite 3.40.0 ha978bb4_0 conda-forge
libssh2 1.10.0 h47af595_3 conda-forge
libtasn1 4.19.0 hb7f2c08_0 conda-forge
libtiff 4.4.0 hdb44e8a_4 conda-forge
libunistring 0.9.10 h0d85af4_0 conda-forge
libvpx 1.11.0 he49afe7_3 conda-forge
libwebp-base 1.2.4 h775f41a_0 conda-forge
libxcb 1.13 h0d85af4_1004 conda-forge
libxml2 2.10.3 hb9e07b5_0 conda-forge
libzlib 1.2.13 hfd90126_4 conda-forge
llvm-openmp 15.0.5 h61d9ccf_0 conda-forge
matplotlib 3.4.3 py39h6e9494a_2 conda-forge
matplotlib-base 3.4.3 py39hb07454d_2 conda-forge
matplotlib-inline 0.1.6 pyhd8ed1ab_0 conda-forge
ncurses 6.3 h96cf925_1 conda-forge
nest-asyncio 1.5.6 pyhd8ed1ab_0 conda-forge
nettle 3.8.1 h96f3785_1 conda-forge
numpy 1.23.5 py39hdfa1d0c_0 conda-forge
opencv 4.6.0 py39h6e9494a_6 conda-forge
openh264 2.3.1 hf0c8a7f_1 conda-forge
openjpeg 2.5.0 h5d0d7b0_1 conda-forge
openssl 3.0.7 hfd90126_0 conda-forge
p11-kit 0.24.1 h65f8906_0 conda-forge
packaging 21.3 pyhd8ed1ab_0 conda-forge
pandas 1.5.2 py39hecff1ad_0 conda-forge
parso 0.8.3 pyhd8ed1ab_0 conda-forge
pcre2 10.40 h1c4e4bc_0 conda-forge
pexpect 4.8.0 pyh1a96a4e_2 conda-forge
pickleshare 0.7.5 py_1003 conda-forge
pillow 9.2.0 py39h35d4919_3 conda-forge
pip 22.3.1 pyhd8ed1ab_0 conda-forge
pixman 0.40.0 hbcb3906_0 conda-forge
platformdirs 2.5.2 pyhd8ed1ab_1 conda-forge
prompt-toolkit 3.0.33 pyha770c72_0 conda-forge
proplot 0.9.5 pyhd8ed1ab_1 conda-forge
psutil 5.9.4 py39ha30fb19_0 conda-forge
pthread-stubs 0.4 hc929b4f_1001 conda-forge
ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge
pure_eval 0.2.2 pyhd8ed1ab_0 conda-forge
py-opencv 4.6.0 py39h2a79d86_6 conda-forge
pygments 2.13.0 pyhd8ed1ab_0 conda-forge
pyparsing 3.0.9 pyhd8ed1ab_0 conda-forge
python 3.9.15 h709bd14_0_cpython conda-forge
python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge
python_abi 3.9 3_cp39 conda-forge
pytz 2022.6 pyhd8ed1ab_0 conda-forge
pyzmq 24.0.1 py39hed8f129_1 conda-forge
readline 8.1.2 h3899abd_0 conda-forge
scipy 1.9.3 py39h8a15683_2 conda-forge
setuptools 65.5.1 pyhd8ed1ab_0 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
spectral 0.23.1 pyh1a96a4e_0 conda-forge
stack_data 0.6.2 pyhd8ed1ab_0 conda-forge
svt-av1 1.3.0 hf0c8a7f_0 conda-forge
tk 8.6.12 h5dbffcc_0 conda-forge
tornado 6.2 py39ha30fb19_1 conda-forge
traitlets 5.5.0 pyhd8ed1ab_0 conda-forge
tzdata 2022f h191b570_0 conda-forge
wcwidth 0.2.5 pyh9f0ad1d_2 conda-forge
wheel 0.38.4 pyhd8ed1ab_0 conda-forge
x264 1!164.3095 h775f41a_2 conda-forge
x265 3.5 hbb4e6a2_3 conda-forge
xorg-libxau 1.0.9 h35c211d_0 conda-forge
xorg-libxdmcp 1.1.3 h35c211d_0 conda-forge
xz 5.2.6 h775f41a_0 conda-forge
zeromq 4.3.4 he49afe7_1 conda-forge
zlib 1.2.13 hfd90126_4 conda-forge
zstd 1.5.2 hfa58983_4 conda-forge
OS: MacOS 12.6.1
Tarik Salameh commented
Having the same issue on OS 13.0.1. Happened after running mamba update --all then reinstalling pigouin + proplot from their respective master branches. Python kernel runs fine, but jupyter won't start in general.
Tarik Salameh commented
Resolved after "clear python cache and reload" in vscode. I think jupyter expected Python 3.10.6 and not 3.10.8 post-mamba update.
Dave Jansing commented
Also resolved after "clear python cache and reload"