I used to use spyder as python IDE and was learning QGIS developing recently. But I cannot import qgis.core in spyder although the library can be imported in QGIS Desktop Console successfully.
Here is my setting environment:
My OS is Windows 7;
Spyder was integrated in Anaconda2-4.1.1-Windows-x86_64 and install together, in which default interpreter is Python 2.7.12(64bit)
QGIS 2.18 was installed by Standalone installer 64bit but python is 2.7.5 64bit. Then I modified the environment variables by appending
“C:\Program Files\QGIS 2.18\apps\qgis\python” in PYTHONPATH and
“C:\Program Files\QGIS 2.18\apps\qgis\bin;
C:\Program Files\QGIS 2.18\apps\qgis\python;
C:\Program Files\QGIS 2.18\apps\qgis\python\qgis\core;” in Path.
In term of OSGeo4W Shell, that is another problem.
Which means that I have to run this batch file every time I start OSGeo4W Shell.
So it is weird my addition path in PATH and PYTHONPATH have no effect at all.