I am running into an issue when running 'make examples'. It keeps failing on the making compile step due to an import error. I have opened a new terminal session since running the install, and successfully run the 'hello_ncs.py' example program. This is happening on an Ubuntu 16.04 Virtual Box image on a Win7 Host. I also tried running the pip install separately for pygraphviz.Here is the traceback:
osboxes@osboxes:~/ncsdk$ make examples
OpenCV Installation Starting
OpenCV already setup for python3
make examples starting.
(cd examples; make)
make: Entering directory '/home/osboxes/ncsdk/examples'
make -C apps/.
make: Entering directory '/home/osboxes/ncsdk/examples/apps'
make -C hello_ncs_py/.
make: Entering directory '/home/osboxes/ncsdk/examples/apps/hello_ncs_py'
nothing to make, use 'make run' to run.
make: Leaving directory '/home/osboxes/ncsdk/examples/apps/hello_ncs_py'
make -C multistick_cpp/.
make: Entering directory '/home/osboxes/ncsdk/examples/apps/multistick_cpp'
(cd ../../caffe/GoogLeNet; make compile; cd ../../apps/multistick_cpp; cp ../../caffe/GoogLeNet/graph ./googlenet.graph;)
make: Entering directory '/home/osboxes/ncsdk/examples/caffe/GoogLeNet'
(cd ../../data/ilsvrc12; make)
make: Entering directory '/home/osboxes/ncsdk/examples/data/ilsvrc12'
make: Leaving directory '/home/osboxes/ncsdk/examples/data/ilsvrc12'
Prototxt file already exists
caffemodel file already exists
mvNCCompile -w bvlc_googlenet.caffemodel -s 12 deploy.prototxt
Traceback (most recent call last):
File "/usr/local/bin/mvNCCompile", line 35, in
from Controllers.Scheduler import load_myriad_config, load_network
File "/usr/local/bin/ncsdk/Controllers/Scheduler.py", line 25, in
from Controllers.Optimizer import postParsingOptimizations, selectImplementations, streamEverythingSchedule, fixTensors
File "/usr/local/bin/ncsdk/Controllers/Optimizer.py", line 25, in
from Controllers.Parsers.Parser.Convert import Convert
File "/usr/local/bin/ncsdk/Controllers/Parsers/init.py", line 3, in
from .Caffe import loadNetworkObjects, parse
File "/usr/local/bin/ncsdk/Controllers/Parsers/Caffe.py", line 48, in
from Controllers.GraphUtils import drawGraph, drawGraphFromLayers
File "/usr/local/bin/ncsdk/Controllers/GraphUtils.py", line 23, in
import pygraphviz as pgv
File "/usr/local/lib/python3.5/dist-packages/pygraphviz/init.py", line 58, in
from .agraph import AGraph, Node, Edge, Attribute, ItemAttribute, DotError
File "/usr/local/lib/python3.5/dist-packages/pygraphviz/agraph.py", line 26, in
from . import graphviz as gv
File "/usr/local/lib/python3.5/dist-packages/pygraphviz/graphviz.py", line 28, in
_graphviz = swig_import_helper()
File "/usr/local/lib/python3.5/dist-packages/pygraphviz/graphviz.py", line 24, in swig_import_helper
_mod = imp.load_module('_graphviz', fp, pathname, description)
File "/usr/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/usr/lib/python3.5/imp.py", line 342, in load_dynamic
ImportError: /usr/local/lib/python3.5/dist-packages/pygraphviz/_graphviz.cpython-35m-x86_64-linux-gnu.so: undefined symbol: Agundirected
Makefile:80: recipe for target 'compile' failed
make: *** [compile] Error 1
make: Leaving directory '/home/osboxes/ncsdk/examples/caffe/GoogLeNet'
cp: cannot stat '../../caffe/GoogLeNet/graph': No such file or directory
Makefile:9: recipe for target 'googlenet' failed
make: *** [googlenet] Error 1
make: Leaving directory '/home/osboxes/ncsdk/examples/apps/multistick_cpp'
Makefile:12: recipe for target 'multistick_cpp/.' failed
make: *** [multistick_cpp/.] Error 2
make: Leaving directory '/home/osboxes/ncsdk/examples/apps'
Makefile:13: recipe for target 'apps/.' failed
make: *** [apps/.] Error 2
make: Leaving directory '/home/osboxes/ncsdk/examples'
Makefile:57: recipe for target 'examples' failed
make: *** [examples] Error 2
@apie Try going to the caffe/GoogLeNet directory and see if you can successfully do a make compile. If you can’t, I would recommend reinstalling the ncsdk and seeing if that solves the issue.
You can perform an uninstall of the NCSDK by entering the ncsdk root directory and typing in: make uninstall
Afterwards delete the ncsdk folder and its contents
Navigate to the ncsdk folder you just downloaded and type in: make install
Hello @Tome_at_Intel ,
I have tried the solution that you have suggested above. I re-cloned the fresh copy of NCS and tried 'make compile' (after make install is successful). But I'm still getting the same error that is mentioned in the above thread. I would appreciate if you can help with any workarounds to create a graph file. Thanks !!
Hi @apie, the above mentioned solution didn't work for me. Can you please update the thread if you have found any alternative solution for this? Thanks !!
Hello, I actually I got this error resolved. There was an issue with multiple python versions available in the system. So here is what i did.
You can refer to this link if you still have any issues with pygraphviz.