Ошибка при установке и импорте библиотеки Matplotlib с установленным rasa-nlu в python - PullRequest
0 голосов
/ 17 апреля 2020

Я не могу импортировать matplotlib. ошибка как показано ниже

             ImportError: cannot import name 'cbook' from 'matplotlib' 
             (C:\Users\anbharadwaj\AppData\Roaming\Python\Python37\site-packages\matplotlib\__init__.py)

Следовательно, я удалил и снова попытался переустановить, но не повезло.

Версия matplotlib по умолчанию - 3.2.1. Я попытался понизить версию 2.2, и я получил ошибку ниже при установке

У меня установлен Rasa-NLU с версией 0.15.1, из-за чего я получил ниже сообщение. Я не могу изменить версию rasa-nlu, так как она не будет работать с другой версией. И я не могу импортировать Matplotlib с этой версией. В чем проблема? Как я могу это исправить? Пожалуйста, помогите

ERROR: rasa-nlu 0.15.1 has requirement matplotlib~=2.2, but you'll have 
matplotlib 3.0.2 which is incompatible.



                ERROR: Command errored out with exit status 1:
                command: 'C:\Users\anbharadwaj\AppData\Local\Continuum\anaconda\python.exe' -c 
                'import sys, setuptools, tokenize; sys.argv[0] = 
                 '"'"'C:\\Users\\ANBHAR~1\\AppData\\Local\\Temp\\pip-install- 
                      boc5sza6\\matplotlib\\setup.py'"'"'; 
                      __file__='"'"'C:\\Users\\ANBHAR~1\\AppData\\Local\\Temp\\pip-install- 
                      boc5sza6\\matplotlib\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open) 
                      (__file__);code=f.read().replace('"'"'\r\n'"'"', 
                       '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' 
                        egg_info --egg-base 'C:\Users\ANBHAR~1\AppData\Local\Temp\pip-install- 
                        boc5sza6\matplotlib\pip-egg-info'
                        cwd: C:\Users\ANBHAR~1\AppData\Local\Temp\pip-install-boc5sza6\matplotlib\
                         Complete output (62 lines):
                         ============================================================================
                         Edit setup.cfg to change the build options

                         BUILDING MATPLOTLIB
                               matplotlib: yes [2.2.0]
                               python: yes [3.7.3 (default, Mar 27 2019, 17:13:21) [MSC
                               v.1915 64 bit (AMD64)]]
                               platform: yes [win32]

                          REQUIRED DEPENDENCIES AND EXTENSIONS
                          numpy: yes [version 1.18.1]
                          install_requires: yes [handled by setuptools]
                          libagg: yes [pkg-config information for 'libagg' could not
                           be found. Using local copy.]
                            freetype: no  [The C/C++ header for freetype
                            (freetype2\ft2build.h) could not be found.  You may
                              need to install the development package.]
                              png: no  [The C/C++ header for png (png.h) could not be
                               found.  You may need to install the development
                                 package.]
                               qhull: yes [pkg-config information for 'libqhull' could not
                               be found. Using local copy.]

                   OPTIONAL SUBPACKAGES
                           sample_data: yes [installing]
                           toolkits: yes [installing]
                           tests: no  [skipping due to configuration]
                           toolkits_tests: no  [skipping due to configuration]

                   OPTIONAL BACKEND EXTENSIONS
                             macosx: no  [Mac OS-X only]
                             qt5agg: yes [installing, Qt: 5.9.6, PyQt: 5.9.2; PySide2 not
                                 found]
                               qt4agg: no  [PySide not found; PyQt4 not found]
                             gtk3agg: no  [Requires pygobject to be installed.]
                            gtk3cairo: no  [Requires cairocffi or pycairo to be installed.]
                            gtkagg: no  [Requires pygtk]
                             tkagg: yes [installing; run-time loading from Python Tcl /
                                  Tk]
                             wxagg: no  [requires wxPython]
                             gtk: no  [Requires pygtk]
                             agg: yes [installing]
                              cairo: no  [cairocffi or pycairo not found]
                             windowing: yes [installing]

                        OPTIONAL LATEX DEPENDENCIES
                                   dvipng: no
                                   ghostscript: no
                                      latex: no
                                     pdftops: no

                         OPTIONAL PACKAGE DATA
                                  dlls: no  [skipping due to configuration]

                        ============================================================================
                                       * The following required packages can not be built:
                        * freetype, png
                        * Please check http://gnuwin32.sourceforge.net/packa
                        * ges/freetype.htm for instructions to install
                        * freetype
                        * Please check http://gnuwin32.sourceforge.net/packa
                        * ges/libpng.htm for instructions to install png
----------------------------------------
                                  ERROR: Command errored out with exit status 1: python setup.py 
                                 egg_info Check the logs for full command output.
...