Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

matplotlib import dedent error #1

Open
morvan68 opened this issue Feb 26, 2021 · 1 comment
Open

matplotlib import dedent error #1

morvan68 opened this issue Feb 26, 2021 · 1 comment

Comments

@morvan68
Copy link

error importing dedent from basemap
see
matplotlib/basemap#494
when installing wmpg, basemap from conda-forge is too old/superceded, and clashes with matplotlib version?
fixed it with a hack of editing
basemap/proj.py, to read:
from inspect import cleandoc as dedent

trace:
(wmpl) martin@work-desktop-debian:~/uwo/Supracenter$ python -m supra.bam
Matplotlib is building the font cache; this may take a moment.
Traceback (most recent call last):
File "/home/martin/miniconda2/envs/wmpl/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/martin/miniconda2/envs/wmpl/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/martin/uwo/Supracenter/supra/bam.py", line 7, in
from supra.GUI.Dialogs.SolutionGUI import SolutionGUI
File "/home/martin/uwo/Supracenter/supra/GUI/Dialogs/SolutionGUI.py", line 45, in
from supra.Fireballs.SeismicTrajectory import timeOfArrival, trajSearch, estimateSeismicTrajectoryAzimuth, plotStationsAndTrajectory, waveReleasePointWindsContour
File "/home/martin/uwo/Supracenter/supra/Fireballs/SeismicTrajectory.py", line 32, in
from supra.Utils.AngleConv import loc2Geo, angle2NDE, geo2Loc, angleBetweenVect
File "/home/martin/uwo/Supracenter/supra/Utils/AngleConv.py", line 6, in
from wmpl.Utils.TrajConversions import latLonAlt2ECEF, ecef2ENU, enu2ECEF, ecef2LatLonAlt
File "/home/martin/miniconda2/envs/wmpl/lib/python3.7/site-packages/westernmeteorpylib-1.0-py3.7-linux-x86_64.egg/wmpl/init.py", line 35, in
module = loader.find_module(module_name).load_module(module_name)
File "/home/martin/miniconda2/envs/wmpl/lib/python3.7/site-packages/westernmeteorpylib-1.0-py3.7-linux-x86_64.egg/wmpl/CAMO/MarkFragments.py", line 12, in
from wmpl.Formats.Met import loadMet
File "/home/martin/miniconda2/envs/wmpl/lib/python3.7/site-packages/westernmeteorpylib-1.0-py3.7-linux-x86_64.egg/wmpl/Formats/Met.py", line 11, in
from wmpl.Formats.GenericFunctions import addSolverOptions
File "/home/martin/miniconda2/envs/wmpl/lib/python3.7/site-packages/westernmeteorpylib-1.0-py3.7-linux-x86_64.egg/wmpl/Formats/GenericFunctions.py", line 8, in
from wmpl.Trajectory.Trajectory import Trajectory
File "/home/martin/miniconda2/envs/wmpl/lib/python3.7/site-packages/westernmeteorpylib-1.0-py3.7-linux-x86_64.egg/wmpl/Trajectory/Trajectory.py", line 27, in
Basemap = importBasemap()
File "/home/martin/miniconda2/envs/wmpl/lib/python3.7/site-packages/westernmeteorpylib-1.0-py3.7-linux-x86_64.egg/wmpl/Utils/OSTools.py", line 49, in importBasemap
from mpl_toolkits.basemap import Basemap
File "/home/martin/miniconda2/envs/wmpl/lib/python3.7/site-packages/mpl_toolkits/basemap/init.py", line 50, in
from .proj import Proj
File "/home/martin/miniconda2/envs/wmpl/lib/python3.7/site-packages/mpl_toolkits/basemap/proj.py", line 6, in
from matplotlib.cbook import dedent
ImportError: cannot import name 'dedent' from 'matplotlib.cbook' (/home/martin/miniconda2/envs/wmpl/lib/python3.7/site-packages/matplotlib/cbook/init.py)

versions:
(wmpl) martin@work-desktop-debian:~$ conda env export
name: wmpl
channels:

  • anaconda
  • conda-forge
  • defaults
    dependencies:
  • _libgcc_mutex=0.1=main
  • absl-py=0.11.0=py37h89c1867_0
  • astor=0.8.1=pyh9f0ad1d_0
  • basemap=1.2.1=py37hd1be537_2
  • basemap-data-hires=1.2.2=0
  • binutils_impl_linux-64=2.31.1=h6176602_1
  • binutils_linux-64=2.31.1=h6176602_9
  • branca=0.4.2=pyhd8ed1ab_0
  • brotlipy=0.7.0=py37hb5d75c8_1001
  • c-ares=1.17.1=h36c2ea0_0
  • ca-certificates=2020.10.14=0
  • cached-property=1.5.1=py_0
  • certifi=2020.6.20=py37_0
  • cffi=1.14.5=py37h261ae71_0
  • cftime=1.2.1=py37heb32a55_0
  • chardet=4.0.0=py37h89c1867_1
  • cryptography=2.9.2=py37hb09aad4_0
  • curl=7.71.1=hbc83047_1
  • cycler=0.10.0=py_2
  • cython=0.29.17=py37h3340039_0
  • dbus=1.13.6=he372182_0
  • decorator=4.4.2=py_0
  • expat=2.2.10=he6710b0_2
  • folium=0.12.0=pyhd8ed1ab_0
  • fontconfig=2.13.1=he4413a7_1000
  • freetype=2.10.4=h7ca028e_0
  • gast=0.4.0=pyh9f0ad1d_0
  • gcc_impl_linux-64=7.3.0=habb00fd_1
  • gcc_linux-64=7.3.0=h553295d_9
  • geos=3.8.0=he1b5a44_1
  • glib=2.67.4=h36276a3_1
  • google-pasta=0.2.0=pyh8c360ce_0
  • grpcio=1.33.2=py37haffed2e_2
  • gst-plugins-base=1.14.0=hbbd80ab_1
  • gstreamer=1.14.0=h28cd5cc_2
  • gxx_impl_linux-64=7.3.0=hdf63c60_1
  • gxx_linux-64=7.3.0=h553295d_9
  • h5py=3.1.0=nompi_py37h1e651dc_100
  • hdf4=4.2.13=hf30be14_1003
  • hdf5=1.10.6=nompi_h7c3c948_1111
  • icu=58.2=hf484d3e_1000
  • idna=2.10=pyh9f0ad1d_0
  • importlib-metadata=3.4.0=py37h89c1867_0
  • jinja2=2.11.3=pyh44b312d_0
  • jpeg=9d=h36c2ea0_0
  • jplephem=2.15=pyh2f6353c_0
  • keras=2.3.1=py37_0
  • keras-applications=1.0.8=py_1
  • keras-preprocessing=1.1.2=pyhd8ed1ab_0
  • kiwisolver=1.3.1=py37hc928c03_0
  • krb5=1.18.2=h173b8e3_0
  • ld_impl_linux-64=2.33.1=h53a641e_7
  • libblas=3.9.0=8_openblas
  • libcblas=3.9.0=8_openblas
  • libcurl=7.71.1=h20c2e04_1
  • libedit=3.1.20191231=h14c3975_1
  • libffi=3.3=he6710b0_2
  • libgcc-ng=9.1.0=hdf63c60_0
  • libgfortran-ng=7.5.0=h14aa051_18
  • libgfortran4=7.5.0=h14aa051_18
  • libgpuarray=0.7.6=h14c3975_1003
  • liblapack=3.9.0=8_openblas
  • libnetcdf=4.6.1=h2053bdc_3
  • libopenblas=0.3.12=pthreads_hb3c22a3_1
  • libpng=1.6.37=h21135ba_2
  • libprotobuf=3.14.0=h8c45485_0
  • libssh2=1.9.0=hab1572f_5
  • libstdcxx-ng=9.1.0=hdf63c60_0
  • libtiff=4.0.10=hc3755c2_1005
  • libuuid=2.32.1=h14c3975_1000
  • libxcb=1.13=h14c3975_1002
  • libxml2=2.9.10=hb55368b_3
  • libxslt=1.1.34=hc22bd24_0
  • lxml=4.6.2=py37h9120a33_0
  • lz4-c=1.9.2=he1b5a44_3
  • mako=1.1.4=pyh44b312d_0
  • markdown=3.3.3=pyh9f0ad1d_0
  • markupsafe=1.1.1=py37hb5d75c8_2
  • matplotlib=3.3.4=py37h89c1867_0
  • matplotlib-base=3.3.4=py37h62a2d02_0
  • ncurses=6.2=he6710b0_1
  • netcdf4=1.5.6=py37hd5c503a_0
  • numpy=1.18.1=py37h8960a57_1
  • obspy=1.2.2=py37h03ebfcd_0
  • olefile=0.46=pyh9f0ad1d_1
  • openssl=1.1.1h=h7b6447c_0
  • pcre=8.44=he1b5a44_0
  • pillow=6.2.1=py37h6b7be26_0
  • pip=21.0.1=py37h06a4308_0
  • proj4=5.2.0=he1b5a44_1006
  • protobuf=3.14.0=py37h2531618_1
  • pthread-stubs=0.4=h36c2ea0_1001
  • pycparser=2.20=pyh9f0ad1d_2
  • pyephem=3.7.6.0=py37h14c3975_1000
  • pygpu=0.7.6=py37h161383b_1002
  • pyhdf=0.10.2=py37hb36aea3_2
  • pyopengl=3.1.5=py_0
  • pyopenssl=19.1.0=py37_0
  • pyparsing=2.4.7=pyh9f0ad1d_0
  • pyproj=1.9.6=py37h516909a_1002
  • pyqt=5.9.2=py37hcca6a23_4
  • pyqtgraph=0.11.1=pyhd3deb0d_0
  • pyshp=2.1.3=pyh44b312d_0
  • pysocks=1.7.1=py37h89c1867_3
  • python=3.7.9=h7579374_0
  • python-dateutil=2.8.1=py_0
  • python_abi=3.7=1_cp37m
  • pytz=2021.1=pyhd8ed1ab_0
  • pyyaml=5.3.1=py37hb5d75c8_1
  • qt=5.9.7=h5867ecd_1
  • readline=8.1=h27cfd23_0
  • requests=2.25.1=pyhd3deb0d_0
  • scipy=1.5.3=py37h8911b10_0
  • setuptools=52.0.0=py37h06a4308_0
  • simplekml=1.3.5=pyh9f0ad1d_0
  • sip=4.19.8=py37hf484d3e_0
  • six=1.15.0=pyh9f0ad1d_0
  • sqlalchemy=1.3.5=py37h516909a_0
  • sqlite=3.33.0=h62c20be_0
  • tensorboard=1.14.0=py37_0
  • tensorflow=1.14.0=h4531e10_0
  • tensorflow-base=1.14.0=py37h4531e10_0
  • tensorflow-estimator=1.14.0=py37h5ca1d4c_0
  • termcolor=1.1.0=py_2
  • theano=1.0.5=py37h745909e_1
  • tk=8.6.10=hbc83047_0
  • tornado=6.1=py37h4abf009_0
  • typing_extensions=3.7.4.3=py_0
  • urllib3=1.26.3=pyhd8ed1ab_0
  • werkzeug=1.0.1=pyh9f0ad1d_0
  • wheel=0.36.2=pyhd3eb1b0_0
  • wrapt=1.12.1=py37h4abf009_2
  • xorg-libxau=1.0.9=h14c3975_0
  • xorg-libxdmcp=1.1.3=h516909a_0
  • xz=5.2.5=h7b6447c_0
  • yaml=0.2.5=h516909a_0
  • zipp=3.4.0=py_0
  • zlib=1.2.11=h7b6447c_3
  • zstd=1.4.5=h9ceee32_0
  • pip:
    • attrs==20.3.0
    • future==0.18.2
    • pyqt5==5.15.2
    • pyqt5-sip==12.8.1
    • pyswarm==0.6
    • pyswarms==1.3.0
    • tqdm==4.57.0
    • westernmeteorpylib==1.0
@lmcfadd6
Copy link
Collaborator

Sorry for the late reply,

If anyone has this issue in the future, Denis has some fixes for this, you'll need to use an older version of matplotlib:
https://github.com/wmpg/WesternMeteorPyLib#importerror-cannot-import-name-dedent-from-matplotlibcbook-error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants