title: Tensorboard Install Fails while Installing Tensorflow in Conda Environment on M1 Mac
body: <p>I'm trying to install tensorflow on an M1 Mac. I've been trying to follow <a href="https://www.ai-buzz.com/18-steps-to-install-tensorflow_macos-on-m1-macbook-2020/" rel="nofollow noreferrer">this tutorial</a> to install <a href="https://github.com/apple/tensorflow_macos" rel="nofollow noreferrer">the pre release version of tensorflow for Mac</a>.
  From the pre-release repo:</p>
  <blockquote>
  <p>This pre-release delivers hardware-accelerated TensorFlow and TensorFlow Addons for macOS 11.0+. Native hardware acceleration is supported on M1 Macs and Intel-based Macs through Apple’s ML Compute framework.</p>
  </blockquote>
  <p>The pre-release requires Python 3.8, so that's what I set up my conda environment with.</p>
  <p>The tutorial above tries to install a previous version of tensorflow for M1 Mac, so I adjusted the commands to use the version of tensorflow for M1 Mac that I've downloaded.</p>
  <p>I've been trying to do this install in a virtual environment using <a href="https://github.com/conda-forge/miniforge" rel="nofollow noreferrer">Miniforge</a>, as it is what multiple tutorials have recommended for M1 Mac installs. From the Miniforge repo:</p>
  <blockquote>
  <p>This repository holds a minimal installer for Conda specific to conda-forge. It is comparable to Miniconda</p>
  </blockquote>
  <hr />
  <p>When I get to the step to install tensorboard, <code>pip install tensorboard</code>, the install gets as far as:</p>
  <pre><code>Building wheels for collected packages: grpcio
    Building wheel for grpcio (setup.py) ... error
  </code></pre>
  <p>The errors go on for many pages, but here is the last block:</p>
  <pre><code>    Traceback (most recent call last):
        File &quot;/private/var/folders/nq/2mtcpkp51dd149_bnk1g1t340000gn/T/pip-install-ze40tjy3/grpcio_c9426269e87d4673a65bd63bd6af18ee/src/python/grpcio/commands.py&quot;, line 282, in build_extensions
          build_ext.build_ext.build_extensions(self)
        File &quot;/Users/bitflow/miniforge3/envs/conda-tf-venv/lib/python3.8/distutils/command/build_ext.py&quot;, line 449, in build_extensions
          self._build_extensions_serial()
        File &quot;/Users/bitflow/miniforge3/envs/conda-tf-venv/lib/python3.8/distutils/command/build_ext.py&quot;, line 474, in _build_extensions_serial
          self.build_extension(ext)
        File &quot;/Users/bitflow/miniforge3/envs/conda-tf-venv/lib/python3.8/site-packages/setuptools/command/build_ext.py&quot;, line 208, in build_extension
          _build_ext.build_extension(self, ext)
        File &quot;/Users/bitflow/miniforge3/envs/conda-tf-venv/lib/python3.8/distutils/command/build_ext.py&quot;, line 528, in build_extension
          objects = self.compiler.compile(sources,
        File &quot;/private/var/folders/nq/2mtcpkp51dd149_bnk1g1t340000gn/T/pip-install-ze40tjy3/grpcio_c9426269e87d4673a65bd63bd6af18ee/src/python/grpcio/_parallel_compile_patch.py&quot;, line 58, in _parallel_compile
          multiprocessing.pool.ThreadPool(BUILD_EXT_COMPILER_JOBS).map(
        File &quot;/Users/bitflow/miniforge3/envs/conda-tf-venv/lib/python3.8/multiprocessing/pool.py&quot;, line 364, in map
          return self._map_async(func, iterable, mapstar, chunksize).get()
        File &quot;/Users/bitflow/miniforge3/envs/conda-tf-venv/lib/python3.8/multiprocessing/pool.py&quot;, line 771, in get
          raise self._value
        File &quot;/Users/bitflow/miniforge3/envs/conda-tf-venv/lib/python3.8/multiprocessing/pool.py&quot;, line 125, in worker
          result = (True, func(*args, **kwds))
        File &quot;/Users/bitflow/miniforge3/envs/conda-tf-venv/lib/python3.8/multiprocessing/pool.py&quot;, line 48, in mapstar
          return list(map(*args))
        File &quot;/private/var/folders/nq/2mtcpkp51dd149_bnk1g1t340000gn/T/pip-install-ze40tjy3/grpcio_c9426269e87d4673a65bd63bd6af18ee/src/python/grpcio/_parallel_compile_patch.py&quot;, line 54, in _compile_single_file
          self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
        File &quot;/private/var/folders/nq/2mtcpkp51dd149_bnk1g1t340000gn/T/pip-install-ze40tjy3/grpcio_c9426269e87d4673a65bd63bd6af18ee/src/python/grpcio/commands.py&quot;, line 265, in new_compile
          return old_compile(obj, src, ext, cc_args, extra_postargs,
        File &quot;/Users/bitflow/miniforge3/envs/conda-tf-venv/lib/python3.8/distutils/unixccompiler.py&quot;, line 120, in _compile
          raise CompileError(msg)
      distutils.errors.CompileError: command 'gcc' failed with exit status 1
      
      ----------------------------------------
  ERROR: Command errored out with exit status 1: /Users/bitflow/miniforge3/envs/conda-tf-venv/bin/python3.8 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '&quot;'&quot;'/private/var/folders/nq/2mtcpkp51dd149_bnk1g1t340000gn/T/pip-install-ze40tjy3/grpcio_c9426269e87d4673a65bd63bd6af18ee/setup.py'&quot;'&quot;'; __file__='&quot;'&quot;'/private/var/folders/nq/2mtcpkp51dd149_bnk1g1t340000gn/T/pip-install-ze40tjy3/grpcio_c9426269e87d4673a65bd63bd6af18ee/setup.py'&quot;'&quot;';f = getattr(tokenize, '&quot;'&quot;'open'&quot;'&quot;', open)(__file__) if os.path.exists(__file__) else io.StringIO('&quot;'&quot;'from setuptools import setup; setup()'&quot;'&quot;');code = f.read().replace('&quot;'&quot;'\r\n'&quot;'&quot;', '&quot;'&quot;'\n'&quot;'&quot;');f.close();exec(compile(code, __file__, '&quot;'&quot;'exec'&quot;'&quot;'))' install --record /private/var/folders/nq/2mtcpkp51dd149_bnk1g1t340000gn/T/pip-record-t11k_i1o/install-record.txt --single-version-externally-managed --compile --install-headers /Users/bitflow/miniforge3/envs/conda-tf-venv/include/python3.8/grpcio Check the logs for full command output.
  </code></pre>
  <p>There was an earlier step to install grpcio, that claimed to work successfully, that used the following command:</p>
  <pre><code>pip install --upgrade -t “$env/lib/python3.8/site-packages/” --no-dependencies --force &quot;$libs/grpcio-1.33.2-cp38-cp38-macosx_11_0_arm64.whl&quot;
  </code></pre>
  <hr />
  <p>I tried to import tensorflow in python, without having tensorboard installed, and the only error appears to be that tensorboard is not yet installed. This gives me some confidence that the rest of the set up went okay.</p>
  <pre><code>&gt;&gt;&gt; import tensorflow
  WARNING:root:Limited tf.compat.v2.summary API due to missing TensorBoard installation.
  WARNING:root:Limited tf.compat.v2.summary API due to missing TensorBoard installation.
  WARNING:root:Limited tf.compat.v2.summary API due to missing TensorBoard installation.
  WARNING:root:Limited tf.summary API due to missing TensorBoard installation.
  </code></pre>
  <p>I double checked, and retried, the step around installing grpcio before trying again. While grpcio seemed to install okay again, the tensorboard install still failed in the same way.</p>
  <p>I'd really appreciate any help that could be offered to solve this.</p>