2

I just got a new Mac with an M1 chip, but I have problems getting our stack to run.

Its a django project, with a few dependencies attached. Most of them being:

  • grpcio (1.43.0)
  • google-cloud-vision==2.1.0
  • googlemaps==4.4.2
  • firebase-admin==5.2.0
  • google-api-core[grpc]==1.31.5 via
    • firebase-admin
    • google-api-python-client
    • google-cloud-core
    • google-cloud-firestore
    • google-cloud-storage
    • google-cloud-vision

When installing on a fresh M1, using python 3.9.10, i get this error

Traceback (most recent call last):
  File "/Users/tl/work/project/./manage.py", line 15, in <module>
    execute_from_command_line(sys.argv)
  File "/Users/tl/work/project/venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 425, in execute_from_command_line
    utility.execute()
  File "/Users/tl/work/project/venv/lib/python3.9/site-packages/django/core/management/__init__.py", line 401, in execute
    django.setup()
  File "/Users/tl/work/project/venv/lib/python3.9/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/Users/tl/work/project/venv/lib/python3.9/site-packages/django/apps/registry.py", line 122, in populate
    app_config.ready()
  File "/Users/tl/work/project/image_analysis/apps.py", line 8, in ready
    import image_analysis.signal_handlers
  File "/Users/tl/work/project/image_analysis/signal_handlers.py", line 6, in <module>
    from image_analysis.analyze import analyze_images
  File "/Users/tl/work/project/image_analysis/analyze.py", line 8, in <module>
    from google.cloud import vision
  File "/Users/tl/work/project/venv/lib/python3.9/site-packages/google/cloud/vision/__init__.py", line 18, in <module>
    from google.cloud.vision_v1.services.image_annotator.async_client import (
  File "/Users/tl/work/project/venv/lib/python3.9/site-packages/google/cloud/vision_v1/__init__.py", line 21, in <module>
    from .services.image_annotator import ImageAnnotatorClient as IacImageAnnotatorClient
  File "/Users/tl/work/project/venv/lib/python3.9/site-packages/google/cloud/vision_v1/services/image_annotator/__init__.py", line 18, in <module>
    from .client import ImageAnnotatorClient
  File "/Users/tl/work/project/venv/lib/python3.9/site-packages/google/cloud/vision_v1/services/image_annotator/client.py", line 27, in <module>
    from google.api_core import gapic_v1  # type: ignore
  File "/Users/tl/work/project/venv/lib/python3.9/site-packages/google/api_core/gapic_v1/__init__.py", line 18, in <module>
    from google.api_core.gapic_v1 import config
  File "/Users/tl/work/project/venv/lib/python3.9/site-packages/google/api_core/gapic_v1/config.py", line 23, in <module>
    import grpc
  File "/Users/tl/work/project/venv/lib/python3.9/site-packages/grpc/__init__.py", line 22, in <module>
    from grpc import _compression
  File "/Users/tl/work/project/venv/lib/python3.9/site-packages/grpc/_compression.py", line 15, in <module>
    from grpc._cython import cygrpc
ImportError: dlopen(/Users/tl/work/project/venv/lib/python3.9/site-packages/grpc/_cython/cygrpc.cpython-39-darwin.so, 0x0002): symbol not found in flat namespace '_EVP_DigestSignUpdate'

I tried googling this issue to no avail. I am using brew to install most of my things, so also python.

I also have these settings set in my .zshrc file, to accomdate for other problems:

export CFLAGS="-I/opt/homebrew/opt/openssl/include"
export LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix zlib)/lib"
export CPPFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix zlib)/include"
export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1
export GRPC_PYTHON_BUILD_SYSTEM_ZLIB=1
TLListenreich
  • 103
  • 1
  • 7
  • See the Answer here: https://stackoverflow.com/questions/29777337/macosx-boost-python-pyftgl-symbol-not-found-expected-in-flat-namespace – Faisal Nazik Feb 16 '22 at 08:57
  • @FaisalNazik But this is a 6 or 7 y old issue. Could you explain what it could have to do with mine? Or what is wrong on my machine in this case? – TLListenreich Feb 16 '22 at 10:35

0 Answers0