can't launch tensorboard from mac terminal

problem: I can't run "tensorboard --logdir=summaries" in my terminal because I get this error

system: macbook pro running Catalina environment: running pyenv with python3 as global package: I have tensorflow 2.2.0 installed via pip

Traceback (most recent call last):
  File "/usr/local/bin/tensorboard", line 10, in <module>
    sys.exit(run_main())
  File "/Library/Python/3.7/site-packages/tensorboard/main.py", line 65, in run_main
    default.get_plugins() + default.get_dynamic_plugins(),
  File "/Library/Python/3.7/site-packages/tensorboard/default.py", line 125, in get_dynamic_plugins
    "tensorboard_plugins"
  File "/Library/Python/3.7/site-packages/tensorboard/default.py", line 124, in <listcomp>
    for entry_point in pkg_resources.iter_entry_points(
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2410, in load
    self.require(*args, **kwargs)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2433, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 791, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (setuptools 40.8.0 (/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages), Requirement.parse('setuptools>=41.0.0'))

1 answer

  • answered 2020-07-05 09:35 Rohith

    the setuptools version you have is 40.8.0. tensorboard needs setuptools>=41.0.0.

    So there are two solutions:

    1. update setuptools to >=41.0.0
    2. create a new environment with setuptools>=41.0.0.

    MacOs may not allow you to update setuptools, due to system integrity protection Adding --user python to the command allowed this to work.

    In other words

    pip install --upgrade setuptools --user python