

(User) C:\Users\KUMAR'S>ipython --pylab
Python 3.5.2 |Enthought, Inc. (x86_64)| (default, Mar 2 2017, 16:37:47) [MSC v.1900 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.
IPython 5.3.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
[TerminalIPythonApp] WARNING | Eventloop or matplotlib integration failed. Is matplotlib installed?
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
C:\Users\KUMAR'S\AppData\Local\Enthought\Canopy\edm\envs\User\lib\site-packages\matplotlib\backends\qt_compat.py in <module>()
176 try:
--> 177 from PySide import QtCore, QtGui, __version__, __version_info__
178 except ImportError:
ImportError: No module named 'PySide'
During handling of the above exception, another exception occurred:
ImportError Traceback (most recent call last)
C:\Users\KUMAR'S\AppData\Local\Enthought\Canopy\edm\envs\User\lib\site-packages\IPython\core\shellapp.py in <lambda>(key)
196 shell = self.shell
197 if self.pylab:
--> 198 enable = lambda key: shell.enable_pylab(key, import_all=self.pylab_import_all)
199 key = self.pylab
200 elif self.matplotlib:
C:\Users\KUMAR'S\AppData\Local\Enthought\Canopy\edm\envs\User\lib\site-packages\IPython\core\interactiveshell.py in enable_pylab(self, gui, import_all, welcome_message)
2986 from IPython.core.pylabtools import import_pylab
2987
-> 2988 gui, backend = self.enable_matplotlib(gui)
2989
2990 # We want to prevent the loading of pylab to pollute the user's
C:\Users\KUMAR'S\AppData\Local\Enthought\Canopy\edm\envs\User\lib\site-packages\IPython\core\interactiveshell.py in enable_matplotlib(self, gui)
2947 gui, backend = pt.find_gui_and_backend(self.pylab_gui_select)
2948
-> 2949 pt.activate_matplotlib(backend)
2950 pt.configure_inline_support(self, backend)
2951
C:\Users\KUMAR'S\AppData\Local\Enthought\Canopy\edm\envs\User\lib\site-packages\IPython\core\pylabtools.py in activate_matplotlib(backend)
305 matplotlib.rcParams['backend'] = backend
306
--> 307 import matplotlib.pyplot
308 matplotlib.pyplot.switch_backend(backend)
309
C:\Users\KUMAR'S\AppData\Local\Enthought\Canopy\edm\envs\User\lib\site-packages\matplotlib\pyplot.py in <module>()
113
114 from matplotlib.backends import pylab_setup
--> 115 _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
116
117 _IP_REGISTERED = None
C:\Users\KUMAR'S\AppData\Local\Enthought\Canopy\edm\envs\User\lib\site-packages\matplotlib\backends\__init__.py in pylab_setup()
30 # imports. 0 means only perform absolute imports.
31 backend_mod = __import__(backend_name,
---> 32 globals(),locals(),[backend_name],0)
33
34 # Things we pull in from all backends
C:\Users\KUMAR'S\AppData\Local\Enthought\Canopy\edm\envs\User\lib\site-packages\matplotlib\backends\backend_qt4agg.py in <module>()
16
17
---> 18 from .backend_qt5agg import FigureCanvasQTAggBase as _FigureCanvasQTAggBase
19
20 from .backend_agg import FigureCanvasAgg
C:\Users\KUMAR'S\AppData\Local\Enthought\Canopy\edm\envs\User\lib\site-packages\matplotlib\backends\backend_qt5agg.py in <module>()
14
15 from .backend_agg import FigureCanvasAgg
---> 16 from .backend_qt5 import QtCore
17 from .backend_qt5 import QtGui
18 from .backend_qt5 import FigureManagerQT
C:\Users\KUMAR'S\AppData\Local\Enthought\Canopy\edm\envs\User\lib\site-packages\matplotlib\backends\backend_qt5.py in <module>()
24
25 from matplotlib.widgets import SubplotTool
---> 26 import matplotlib.backends.qt_editor.figureoptions as figureoptions
27
28 from .qt_compat import (QtCore, QtGui, QtWidgets, _getSaveFileName,
C:\Users\KUMAR'S\AppData\Local\Enthought\Canopy\edm\envs\User\lib\site-packages\matplotlib\backends\qt_editor\figureoptions.py in <module>()
18 import matplotlib
19 from matplotlib import cm, markers, colors as mcolors
---> 20 import matplotlib.backends.qt_editor.formlayout as formlayout
21 from matplotlib.backends.qt_compat import QtGui
22
C:\Users\KUMAR'S\AppData\Local\Enthought\Canopy\edm\envs\User\lib\site-packages\matplotlib\backends\qt_editor\formlayout.py in <module>()
54
55 from matplotlib import colors as mcolors
---> 56 from matplotlib.backends.qt_compat import QtGui, QtWidgets, QtCore
57
58
C:\Users\KUMAR'S\AppData\Local\Enthought\Canopy\edm\envs\User\lib\site-packages\matplotlib\backends\qt_compat.py in <module>()
178 except ImportError:
179 raise ImportError(
--> 180 "Matplotlib qt-based backends require an external PyQt4, PyQt5,\n"
181 "or PySide package to be installed, but it was not found.")
182
ImportError: Matplotlib qt-based backends require an external PyQt4, PyQt5,
or PySide package to be installed, but it was not found.
In [1]: x=linspace(-5*pi,5*pi,500)
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-1-894bf0bee282> in <module>()
----> 1 x=linspace(-5*pi,5*pi,500)
NameError: name 'linspace' is not defined
Sir
kindly provide above solution. linspace not defined. what may be the reason.
Indrajit Kumar
Python


Hello Indrajit,
Can you confirm if you have installed PyQt package? You can check if this package is installed by clicking on the Package Installer Icon located on the Canopy Launcher Page.
You can then check all the installed packages by clicking on Installed tab on the left hand side navigation menu.
In case this has not been installed, please install it first and Try running the command again


18-09-19, 7:28 p.m. indrajit642
Login to add comment