Unable to install Speckle-QGIS on M1 Mac

I’m running into a very similar issue today trying to get the QGIS connector to install on MacOS Monterey 12.6. The plugin seems to install correctly, but the Speckle icon doesn’t appear. After restarting QGIS, I see the following error on launch.

My setup:

  • Macbook Pro M1
  • MacOS 12.6
  • QGIS 3.28.3 (Firenze)
  • Speckle QGIS connector 2.13.0

Here’s the error log I see when I open QGIS after install through the official plugin manager:

Couldn't load plugin 'speckle-qgis' due to an error when calling its classFactory() method 

ImportError: cannot import name 'appengine' from 'urllib3.contrib' (/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/urllib3/contrib/__init__.py) 
Traceback (most recent call last):
  File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/requests_toolbelt/_compat.py", line 48, in 
    from requests.packages.urllib3.contrib import appengine as gaecontrib
ImportError: cannot import name 'appengine' from 'requests.packages.urllib3.contrib' (/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/urllib3/contrib/__init__.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 423, in _startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "/Users/nate/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/speckle-qgis/__init__.py", line 52, in classFactory
    from speckle_qgis import SpeckleQGIS
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Users/nate/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/speckle-qgis/speckle_qgis.py", line 38, in 
    from specklepy.api.wrapper import StreamWrapper
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/specklepy/api/wrapper.py", line 9, in 
    from specklepy.api.client import SpeckleClient
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/specklepy/api/client.py", line 24, in 
    from gql.transport.requests import RequestsHTTPTransport
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/gql/transport/requests.py", line 11, in 
    from requests_toolbelt.multipart.encoder import MultipartEncoder
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/requests_toolbelt/__init__.py", line 12, in 
    from .adapters import SSLAdapter, SourceAddressAdapter
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/requests_toolbelt/adapters/__init__.py", line 12, in 
    from .ssl import SSLAdapter
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/requests_toolbelt/adapters/ssl.py", line 16, in 
    from .._compat import poolmanager
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/requests_toolbelt/_compat.py", line 50, in 
    from urllib3.contrib import appengine as gaecontrib
ImportError: cannot import name 'appengine' from 'urllib3.contrib' (/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/urllib3/contrib/__init__.py)


Python version: 3.9.5 (default, Sep 10 2021, 16:18:19) [Clang 12.0.5 (clang-1205.0.22.11)] 
QGIS version: 3.28.2-Firenze Firenze, b47e00ba60 

Python Path:
/Applications/QGIS.app/Contents/MacOS/../Resources/python
/Users/nate/Library/Application Support/QGIS/QGIS3/profiles/default/python
/Users/nate/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins
/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Rtree-0.9.7-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/scipy-1.5.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/geopandas-0.8.1-py3.9.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/opencv_contrib_python-4.3.0.36-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/matplotlib-3.3.0-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/GDAL-3.3.2-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numpy-1.20.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/rasterio-1.1.5-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/pyproj-3.2.0-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/lib-dynload
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/pandas-1.3.3-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/statsmodels-0.11.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/netCDF4-1.5.4-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/cftime-1.2.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python39.zip
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Fiona-1.8.13.post1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Pillow-7.2.0-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/patsy-0.5.1-py3.9.egg
/Users/nate/Library/Application Support/QGIS/QGIS3/profiles/default/python
/Users/nate/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/kmltools/libs

I’ve also tried uninstalling the plugin manually and installing it directly by cloning the main branch from Git. This raised another error related to pip being unable to install the dependencies automatically.

Any suggestions for me?

1 Like

Thanks for the report. We’re investigating issues with M1 Mac support for the 2.14 release. So far these appear to be where C based dependency packages or even sub-dependencies aren’t being released built to address the M1.

I have 2.13 already installed and running on my test M1 MacBook, (both from QGIS plugin Manager and from source) so I’ll look into your error log if urllib3 or any of its requirements being drawn on install are different (potentially newer)

The installing from source (GitHub) issue you encountered is similar. We may need to be extremely granular in specifying and pinning requirements.

1 Like

Thanks Jonathon. Happy to test any pre-release fixes you guys come up with. I’ve also been messing around with my local installation of Python this week (I moved from Anaconda to Homebrew-installed Python 3) and I was thinking that may be an issue, but it looks like QGIS only tries to access a copy of Python 3.9 that it installs itself?

Hey @nate_peters you are correct, QGIS like almost all other app utilizing python somehow tends to vendor a specific python version with the app, to avoid missing python, version mismatch or any other platform / host OS related issues. So you can mess around with your python installations as much as you want, you are (most probably) not gonna break QGIS :slight_smile:

We have to do our best to target the python binaries included in the applications. And we have to make sure all of the dependencies we rely on support all the platforms that we support. Recently this has been getting better, but the Apple transition to ARM (M1) really made this tricky, cause python packages bundling compiled binaries had to supply an M1 compatible build.

In our current case unfortunately we’ve included a dependency, that is not yet updated to target the Apple ARM platform. We’re looking for a good solution on this.

1 Like

Hi @nate_peters , please try the latest release (2.14.1), this hopefully resolves the error. Let us know!

1 Like

Still seeing an error sadly - this is what I’m seeing after installing 2.14.1 and restarting QGIS. It appears to be the same error.

Couldn't load plugin 'speckle-qgis' due to an error when calling its classFactory() method 

ImportError: cannot import name 'appengine' from 'urllib3.contrib' (/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/urllib3/contrib/__init__.py) 
Traceback (most recent call last):
  File "/Users/nate/.config/Speckle/connector_installations/QGIS/requests_toolbelt/_compat.py", line 48, in 
    from requests.packages.urllib3.contrib import appengine as gaecontrib
ImportError: cannot import name 'appengine' from 'requests.packages.urllib3.contrib' (/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/urllib3/contrib/__init__.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 423, in _startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "/Users/nate/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/speckle-qgis/__init__.py", line 62, in classFactory
    from speckle_qgis import SpeckleQGIS
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Users/nate/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/speckle-qgis/speckle_qgis.py", line 50, in 
    from specklepy.api.wrapper import StreamWrapper
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Users/nate/.config/Speckle/connector_installations/QGIS/specklepy/api/wrapper.py", line 4, in 
    from specklepy.api.client import SpeckleClient
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Users/nate/.config/Speckle/connector_installations/QGIS/specklepy/api/client.py", line 8, in 
    from gql.transport.requests import RequestsHTTPTransport
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Users/nate/.config/Speckle/connector_installations/QGIS/gql/transport/requests.py", line 11, in 
    from requests_toolbelt.multipart.encoder import MultipartEncoder
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Users/nate/.config/Speckle/connector_installations/QGIS/requests_toolbelt/__init__.py", line 12, in 
    from .adapters import SSLAdapter, SourceAddressAdapter
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Users/nate/.config/Speckle/connector_installations/QGIS/requests_toolbelt/adapters/__init__.py", line 12, in 
    from .ssl import SSLAdapter
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Users/nate/.config/Speckle/connector_installations/QGIS/requests_toolbelt/adapters/ssl.py", line 16, in 
    from .._compat import poolmanager
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/Users/nate/.config/Speckle/connector_installations/QGIS/requests_toolbelt/_compat.py", line 50, in 
    from urllib3.contrib import appengine as gaecontrib
ImportError: cannot import name 'appengine' from 'urllib3.contrib' (/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/urllib3/contrib/__init__.py)


Python version: 3.9.5 (default, Sep 10 2021, 16:18:19) [Clang 12.0.5 (clang-1205.0.22.11)] 
QGIS version: 3.28.2-Firenze Firenze, b47e00ba60 

Python Path:
/Users/nate/.config/Speckle/connector_installations/QGIS
/Users/nate/.config/Speckle/connector_installations/QGIS
/Applications/QGIS.app/Contents/MacOS/../Resources/python
/Users/nate/Library/Application Support/QGIS/QGIS3/profiles/default/python
/Users/nate/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins
/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Pillow-7.2.0-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/pyproj-3.2.0-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/lib-dynload
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/opencv_contrib_python-4.3.0.36-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/scipy-1.5.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/matplotlib-3.3.0-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/cftime-1.2.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/pandas-1.3.3-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Fiona-1.8.13.post1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numpy-1.20.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/patsy-0.5.1-py3.9.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/geopandas-0.8.1-py3.9.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/netCDF4-1.5.4-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/rasterio-1.1.5-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/statsmodels-0.11.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Rtree-0.9.7-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python39.zip
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/GDAL-3.3.2-py3.9-macosx-10.13.0-x86_64.egg
/Users/nate/Library/Application Support/QGIS/QGIS3/profiles/default/python
/Users/nate/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/kmltools/libs

I’m seeing a second error from QGIS related to Python after the Speckle error too. I’ve been looking for a solution to this but haven’t had any luck yet. I was seeing this sporadically before installing the Speckle plugin so I don’t think it’s directly related to the plugin itself, and Python itself inside of QGIS appears to work fine. Just wanted to add this for context in case it’s relevant.

An error has occurred while executing Python code: 

NameError: name 'edit' is not defined 
Traceback (most recent call last):
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/script/ScriptAlgorithmProvider.py", line 128, in loadAlgorithms
    alg = ScriptUtils.loadAlgorithm(moduleName, filePath)
  File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins/processing/script/ScriptUtils.py", line 67, in loadAlgorithm
    spec.loader.exec_module(module)
  File "", line 855, in exec_module
  File "", line 228, in _call_with_frames_removed
  File "/Users/nate/Library/Application Support/QGIS/QGIS3/profiles/default/processing/scripts/batch-update-feature-value.py", line 3, in 
    with edit(layer):
NameError: name 'edit' is not defined


Python version: 3.9.5 (default, Sep 10 2021, 16:18:19) [Clang 12.0.5 (clang-1205.0.22.11)] 
QGIS version: 3.28.2-Firenze Firenze, b47e00ba60 

Python Path:
/Users/nate/.config/Speckle/connector_installations/QGIS
/Users/nate/.config/Speckle/connector_installations/QGIS
/Applications/QGIS.app/Contents/MacOS/../Resources/python
/Users/nate/Library/Application Support/QGIS/QGIS3/profiles/default/python
/Users/nate/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins
/Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Pillow-7.2.0-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/pyproj-3.2.0-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/lib-dynload
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/opencv_contrib_python-4.3.0.36-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/scipy-1.5.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/matplotlib-3.3.0-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/cftime-1.2.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/pandas-1.3.3-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Fiona-1.8.13.post1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numpy-1.20.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/patsy-0.5.1-py3.9.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/geopandas-0.8.1-py3.9.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/netCDF4-1.5.4-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/rasterio-1.1.5-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/statsmodels-0.11.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Rtree-0.9.7-py3.9-macosx-10.13.0-x86_64.egg
/Applications/QGIS.app/Contents/MacOS/lib/python39.zip
/Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/GDAL-3.3.2-py3.9-macosx-10.13.0-x86_64.egg
/Users/nate/Library/Application Support/QGIS/QGIS3/profiles/default/python
/Users/nate/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/kmltools/libs

Thanks for checking! Could you please look into the folder /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/ and tell the versions of the packages requests_toolbelt and urllib3?
e.g. 0.10.1 and 1.26.16
image

requests_toolbelt: 0.10.1
urllib3: 2.0.2

Thanks!
Now, check if the folder /Users/nate/.config/Speckle/connector_installations/QGIS also has urllib3 folders, if so, delete them both, and in QGIS → Plugins → Python Console paste this:

path = r"/Users/nate/.config/Speckle/connector_installations/QGIS"

#find executable on Mac
pythonExec = os.path.dirname(sys.executable) + "/bin/python3"

# installing the library
import os; import sys; import subprocess; result = subprocess.run([pythonExec, "-m", "pip", "install", "-t", path, "urllib3>=1.26.0,<=1.26.16"], capture_output=True, text=True, shell=True, timeout=1000); print(result) 

Let’s see what the output is and if the folders for urllib3 have re-appeared in /Users/nate/.config/Speckle/connector_installations/QGIS, and in which version :pray:

P.S. if the urllib3 has been now installed to this folder with the correct (1.26.x) version, you should be able to start the plugin with no issues after restarting QGIS.

I checked in the .config folder you mentioned, and urllib3 version 1.26.16 was installed there. I removed it and then moved on to the Python step. The script didn’t return anything useful. Am I running this in the right place? It doesn’t appear that the logs from the subprocess made it up to the QGIS console.

Here’s the text output in the console:

exec(Path('/var/folders/tb/mbxx86bj0g366_nkxh63m6t80000gn/T/tmp6hnndayu.py').read_text())
CompletedProcess(args=['/Applications/QGIS.app/Contents/MacOS/bin/python3', '-m', 'pip', 'install', '-t', '/Users/nate/.config/Speckle/connector_installations/QGIS', 'urllib3>=1.26.0,<=1.26.16'], returncode=0, stdout='', stderr='')

Thanks a lot @nate_peters ! The console returned code ‘0’, which is good news, and it’s not another Mac M1 issue not installing specific library versions, that I was worried about :upside_down_face:

But there appears to be 2 problems.

  • Some of the essential Python libraries turned out incompatible in the latest release, and you have installed a very-very fresh version of all the packages recently (which is why you are the first one to get this error)

Speckle plugin for QGIS creates it’s own folder with all dependencies, and imports them from this folder, but here’s the issue #2:

  • It seems that some of the libraries are imported into QGIS before Speckle plugin loads, so it picks up the installation from the default Python setup rather than the new custom folder. This is why the required urllib-1.26.16 is being ignored and 2.0.2 picked from the default Python instead.

We need to investigate this issue better, because more users might start having this issue soon :sob: But the quick solution for you would be to pip install urllib3 version 1.26.16 to the default python libraries ( /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/), of course, if you don’t need the 2.0.2 in your other applications.

Hope this helps!

1 Like