I'm running QGIS 2.14 and trying to learn how to develop python standalone scripts. Currently I am using Canopy's (v 188.8.131.5242) distribution of Python 2.7. My development is on a Mac (OS 10.13.1) and I have set my
/Applications/Qgis.app/Contents/Resources/python. When I type in
from qgis.core import *
I get the following error trace:
ImportErrorTraceback (most recent call last)` <ipython-input-8-f6129d8bb24b> in <module>()` ----> 1 from qgis.core import * /Applications/QGis.app/Contents/Resources/python/qgis/__init__.py in <module>() 34 pass 35 ---> 36 from qgis.core import QgsFeature, QgsGeometry 37 38 /Applications/QGis.app/Contents/Resources/python/qgis/core/__init__.py in <module>() 33 import string 34 from qgis._core import * ---> 35 from PyQt4.QtCore import QCoreApplication 36 37 /Users/babsii/Library/Enthought/Canopy/edm/envs/User/lib/python2.7/site-packages/IPython/external/qt_loaders.py in load_module(self, fullname) 54 Importing %s disabled by IPython, which has 55 already imported an Incompatible QT Binding: %s ---> 56 """ % (fullname, loaded_api())) 57 58 ID = ImportDenier() ImportError: Importing PyQt4 disabled by IPython, which has already imported an Incompatible QT Binding: pyside
I see if I run a non-Enthought/Canopy distribution, I don't have this issue. Is there a way to still use the Enthought/Canopy distribution?