Error with tensorboard on Mac - macos

I have recently installed tensorflow, and it seems working fine until I was trying to display computing graph using tensorboard. I got the following error:
python /usr/local/lib/python2.7/site-packages/tensorflow/tensorboard/tensorboard.py --logdir=/tmp/basic/
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/tensorflow/tensorboard/tensorboard.py", line 13, in <module>
import tensorflow.python.platform
File "/usr/local/lib/python2.7/site-packages/tensorflow/__init__.py", line 4, in <module>
from tensorflow.python import *
File "/usr/local/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 13, in <module>
from tensorflow.core.framework.graph_pb2 import *
File "/usr/local/lib/python2.7/site-packages/tensorflow/core/framework/graph_pb2.py", line 16, in <module>
from tensorflow.core.framework import attr_value_pb2 as tensorflow_dot_core_dot_framework_dot_attr__value__pb2
File "/usr/local/lib/python2.7/site-packages/tensorflow/core/framework/attr_value_pb2.py", line 16, in <module>
from tensorflow.core.framework import tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__pb2
File "/usr/local/lib/python2.7/site-packages/tensorflow/core/framework/tensor_pb2.py", line 16, in <module>
from tensorflow.core.framework import tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2
File "/usr/local/lib/python2.7/site-packages/tensorflow/core/framework/tensor_shape_pb2.py", line 22, in <module>
serialized_pb=_b('\n,tensorflow/core/framework/tensor_shape.proto\x12\ntensorflow\"d\n\x10TensorShapeProto\x12-\n\x03\x64im\x18\x02 \x03(\x0b\x32 .tensorflow.TensorShapeProto.Dim\x1a!\n\x03\x44im\x12\x0c\n\x04size\x18\x01 \x01(\x03\x12\x0c\n\x04name\x18\x02 \x01(\tb\x06proto3')
TypeError: __init__() got an unexpected keyword argument 'syntax'
Any suggestion about how to solve the problem?

This looks like a TensorBoard bug rather than a usage issue. Could you file a bug against it on our Github?
It will be way easier for us to track it down if you can give us a clean repro, including:
- How you installed TensorFlow
- The events file that triggers this bug
The issue you're encountering is related to the latest code from master; most people install from pip, but I've been seeing a few issues where people's pip installations are somehow sucking in new code from master. Are you intending to use cutting-edge unreleased source from our master branch, or did you install e.g. version 0.7.1 and are surprised that you have unstable code?

Related

Class RunLoopModeTracker is implemented in both locations. Can't open Spyder

I have no idea what I'm doing.
MacOS Version 10.13.4 and Python 3.7.3
I had anaconda installed and was using spyder fine, but I thought I'd install spyder-terminal using command pip install spyder-terminal because I thought that's how I'd get the terminal to show? Anyways now when I try opening spyder, I get this error:
objc[1685]: Class RunLoopModeTracker is implemented in both /anaconda3/lib/python3.7/site-packages/PyQt5/Qt/lib/QtCore.framework/Versions/5/QtCore (0x117d8e270) and /anaconda3/lib/libQt5Core.5.dylib (0x11fabda80). One of the two will be used. Which one is undefined.
Traceback (most recent call last):
File "/anaconda3/bin/spyder", line 11, in <module>
sys.exit(main())
File "/anaconda3/lib/python3.7/site-packages/spyder/app/start.py", line 186, in main
from spyder.app import mainwindow
File "/anaconda3/lib/python3.7/site-packages/spyder/app/mainwindow.py", line 90, in <module>
from qtpy import QtWebEngineWidgets # analysis:ignore
File "/anaconda3/lib/python3.7/site-packages/qtpy/QtWebEngineWidgets.py", line 22, in <module>
from PyQt5.QtWebEngineWidgets import QWebEnginePage
ValueError: PyCapsule_GetPointer called with incorrect name
I tried uninstalling anaconda and then re-installing/updating and re-installing spyder, but I'm still unable to open. Anyone know how to fix this?

No module named 'tokenize'

Trouble with anaconda:
Error message below.
Reason why I think this is happening:
Accidentally deleted some files
I tried to uninstall Anaconda, and reinstall, however, when reinstalling - installer says Anaconda already installed, hence, not able to get Anaconda working.
Scanned through the net and stackoverflow, but unable to find an answer. Error message below:
"
Traceback (most recent call last):
File "/miniconda3/bin/conda", line 13, in <module>
sys.exit(main())
File "/miniconda3/lib/python3.7/site-packages/conda/cli/main.py", line 149, in main
from ..exceptions import conda_exception_handler
File "/miniconda3/lib/python3.7/site-packages/conda/exceptions.py", line 10, in <module>
from logging import getLogger
File "/miniconda3/lib/python3.7/logging/__init__.py", line 26, in <module>
import sys, os, time, io, traceback, warnings, weakref, collections.abc
File "/miniconda3/lib/python3.7/traceback.py", line 5, in <module>
import linecache
File "/miniconda3/lib/python3.7/linecache.py", line 11, in <module>
import tokenize
ModuleNotFoundError: No module named 'tokenize' "

Ambari HDP 2.4 Add Hosts Metrics Monitor fail to Install

I'm trying to add some more hosts to my Ambari Cluster, running HDP 2.4 and the Metrics Monitor does not seem to be installing correctly, all the other services are starting fine.
Below is the output I get when I attempt to start Metrics Monitor on one of the new hosts.
255. Building psutil...
Traceback (most recent call last):
File "setup.py", line 15, in <module>
from setuptools import setup, Extension
File "/usr/lib/python2.7/site-packages/setuptools/__init__.py", line 12, in <module>
import setuptools.version
File "/usr/lib/python2.7/site-packages/setuptools/version.py", line 1, in <module>
import pkg_resources
File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 72, in <module>
import packaging.requirements
File "/usr/lib/python2.7/site-packages/packaging/requirements.py", line 59, in <module>
MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
TypeError: __call__() takes exactly 2 arguments (1 given)
Verifying Python version compatibility...
Using python /usr/bin/python2.7
Checking for previously running Metric Monitor...
Starting ambari-metrics-monitor
Verifying ambari-metrics-monitor process status...
ERROR: ambari-metrics-monitor start failed. For more details, see /var/log/ambari-metrics-monitor/ambari-metrics-monitor.out:
====================
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/resource_monitoring/main.py", line 27, in <module>
from core.controller import Controller
File "/usr/lib/python2.6/site-packages/resource_monitoring/core/controller.py", line 28, in <module>
from metric_collector import MetricsCollector
File "/usr/lib/python2.6/site-packages/resource_monitoring/core/metric_collector.py", line 23, in <module>
from host_info import HostInfo
File "/usr/lib/python2.6/site-packages/resource_monitoring/core/host_info.py", line 22, in <module>
import psutil
ImportError: No module named psutil
====================
Monitor out at: /var/log/ambari-metrics-monitor/ambari-metrics-monitor.out
And this is the output of /var/log/ambari-metrics-monitor/ambari-metrics-monitor.out
psutil binaries need to be built by running, psutil/build.py manually or by running a, mvn clean package, command.
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/resource_monitoring/main.py", line 27, in <module>
from core.controller import Controller
File "/usr/lib/python2.6/site-packages/resource_monitoring/core/controller.py", line 28, in <module>
from metric_collector import MetricsCollector
File "/usr/lib/python2.6/site-packages/resource_monitoring/core/metric_collector.py", line 23, in <module>
from host_info import HostInfo
File "/usr/lib/python2.6/site-packages/resource_monitoring/core/host_info.py", line 22, in <module>
import psutil
ImportError: No module named psutil
I have tried going into that directory and running sudo python psutil/build.py, as well as running sudo make. Both do not work.
Any ideas would be great!
This is an issue with your python environment, it's been corrupted somehow (most likely using sudo pip install <package>, using sudo and pip together can sometimes cause this issue). There are details on how to fix this issue on this SO question. After you fix your python issue you should be able to retry the host addition through Ambari.

Installed Miniconda 4.2.11 and have import error while creating environment

I am able to create environment from environment.yml file which has release number 4.2.7 but recently updated miniconda distribution on my Desktop to 4.2.11. Can I go back to my previous distribution?
Snippet of the error:
Traceback (most recent call last):
File "/Users/ramya/miniconda2/bin/conda-env", line 4, in <module>
import conda_env.cli.main
File "/Users/ramya/miniconda2/lib/python2.7/site-packages/conda_env/cli/main.py", line 35, in <module>
from . import main_attach
File "/Users/ramya/miniconda2/lib/python2.7/site-packages/conda_env/cli/main_attach.py", line 4, in <module>
from ..env import from_environment
File "/Users/ramya/miniconda2/lib/python2.7/site-packages/conda_env/env.py", line 17, in <module>
from . import yaml
File "/Users/ramya/miniconda2/lib/python2.7/site-packages/conda_env/yaml.py", line 8, in <module>
import yaml
Answering my own question here - I got hold of a previous download of Miniconda (Miniconda2-latest-MacOSX-x86_64.sh) Installation file and created my environment which resolved my problem.

import matplotlib.pyplot not working

I am new to python and just trying to set everything up. I've tried reinstalling but still keep getting an error when I try "import matplotlib.pyplot as plt", anyone know what this means?
Traceback (most recent call last):
File "<pyshell#5>", line 1, in <module>
import matplotlib.pyplot as plt
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/pyplot.py", line 23, in <module>
from matplotlib.figure import Figure, figaspect
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/figure.py", line 16, in <module>
import artist
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/artist.py", line 6, in <module>
from transforms import Bbox, IdentityTransform, TransformedBbox, TransformedPath
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/transforms.py", line 34, in <module>
from matplotlib._path import affine_transform
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/_path.so, 2): no suitable image found. Did find:
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/_path.so: no matching architecture in universal wrapper
Thanks!
I've run into a similar problem when installing python and matplotlib on multiple Mac OSs. What I ended up doing was reinstalling with Python2.6 and also getting compatible packages. It took a little while to figure out which combination works with which architecture, but eventually I got everything to run.
The matplotlib website even mentions these issuse:
"The build situation on OSX is complicated by the various places one can get the png and freetype requirements from (darwinports, fink, /usr/X11R6) and the different architectures (x86, ppc, universal) and the different OSX version (10.4 and 10.5)."

Resources