Closed Gustry closed 6 years ago
I started using Raven inside a QGIS plugin : https://github.com/qgis/QGIS
QGIS 2.18 is using Python 2.7 (until QGIS 3 which will come soon with Python 3).
But I had to change the way contextlib is imported in my Python 2.7 environment:
import sys sys.version_info sys.version_info(major=2, minor=7, micro=10, releaselevel='final', serial=0) import contextlib2 as contextlib Traceback (most recent call last): File "<input>", line 1, in <module> File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ImportError: No module named contextlib2 import contextlib
The last import works perfectly on Python 2.7 on Windows and Mac.
It seems it's coming from QGIS.
I started using Raven inside a QGIS plugin : https://github.com/qgis/QGIS
QGIS 2.18 is using Python 2.7 (until QGIS 3 which will come soon with Python 3).
But I had to change the way contextlib is imported in my Python 2.7 environment:
The last import works perfectly on Python 2.7 on Windows and Mac.