I am trying to go through <tutorials>. Has anyone ...
# ask-community
y
I am trying to go through tutorials. Has anyone had this issue on Mac M2 and know the solution besides conda? Fresh environment
Copy code
pip install --upgrade pip
python -m venv ./venv
source ./venv/bin/activate
pip install dagster dagster-webserver --find-links=<https://github.com/dagster-io/build-grpcio/wiki/Wheels>
./venv/bin/dagster dev
Output
Copy code
./venv/bin/dagster dev                                                                           ✔  dagster Py  07:04:43 
Traceback (most recent call last):
  File "/Users/myuser/spWorking/dagster_tutorials/dagster/./venv/bin/dagster", line 5, in <module>
    from dagster.cli import main
  File "/Users/myuser/spWorking/dagster_tutorials/dagster/venv/lib/python3.10/site-packages/dagster/_module_alias_map.py", line 72, in exec_module
    base_module = importlib.import_module(self.base_spec.name)
  File "/Users/myuser/miniconda3/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/Users/myuser/spWorking/dagster_tutorials/dagster/venv/lib/python3.10/site-packages/dagster/_cli/__init__.py", line 4, in <module>
    from .api import api_cli
  File "/Users/myuser/spWorking/dagster_tutorials/dagster/venv/lib/python3.10/site-packages/dagster/_cli/api.py", line 14, in <module>
    from dagster._cli.workspace.cli_target import (
  File "/Users/myuser/spWorking/dagster_tutorials/dagster/venv/lib/python3.10/site-packages/dagster/_cli/workspace/__init__.py", line 1, in <module>
    from .cli_target import (
  File "/Users/myuser/spWorking/dagster_tutorials/dagster/venv/lib/python3.10/site-packages/dagster/_cli/workspace/cli_target.py", line 29, in <module>
    from dagster._core.host_representation.code_location import CodeLocation
  File "/Users/myuser/spWorking/dagster_tutorials/dagster/venv/lib/python3.10/site-packages/dagster/_core/host_representation/__init__.py", line 9, in <module>
    from .external import (
  File "/Users/myuser/spWorking/dagster_tutorials/dagster/venv/lib/python3.10/site-packages/dagster/_core/host_representation/external.py", line 37, in <module>
    from dagster._core.host_representation.origin import (
  File "/Users/myuser/spWorking/dagster_tutorials/dagster/venv/lib/python3.10/site-packages/dagster/_core/host_representation/origin.py", line 16, in <module>
    import grpc
  File "/Users/myuser/spWorking/dagster_tutorials/dagster/venv/lib/python3.10/site-packages/grpc/__init__.py", line 22, in <module>
    from grpc import _compression
  File "/Users/myuser/spWorking/dagster_tutorials/dagster/venv/lib/python3.10/site-packages/grpc/_compression.py", line 20, in <module>
    from grpc._cython import cygrpc
ImportError: dlopen(/Users/myuser/spWorking/dagster_tutorials/dagster/venv/lib/python3.10/site-packages/grpc/_cython/cygrpc.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace '_CFDataGetBytes'
Tried this and getting same error:
Copy code
pip uninstall grpcio
pip install grpcio
This solved my issue:
Copy code
pip uninstall grpcio
export GRPC_PYTHON_LDFLAGS=" -framework CoreFoundation"
pip install grpcio --no-binary :all: