-4

trying to run this project

and got an error when typing:

             python demo.py --gpu 0 

on my terminal

the error:

Using mxnet as:
<module 'mxnet' (namespace)>
Warning: using pre-installed version of mxnet may cause unexpected error...
(export MXNET_EXAMPLE_SSD_DISABLE_PRE_INSTALLED=1) to prevent loading pre-installed mxnet.
Traceback (most recent call last):
  File "demo.py", line 6, in <module>
    from detect.detector import Detector
  File "/home/ubuntu-linux/mxnet-ssd/detect/detector.py", line 6, in <module>
    from dataset.iterator import DetIter
  File "/home/ubuntu-linux/mxnet-ssd/dataset/iterator.py", line 6, in <module>
    class DetRecordIter(mx.io.DataIter):
AttributeError: module 'mxnet' has no attribute 'io'

help

after running (git clone --recursive https://github.com/zhreshold/mxnet-ssd.git)

the old error was gone but got this new error:

Traceback (most recent call last):
  File "demo.py", line 2, in <module>
    import tools.find_mxnet
  File "/home/ubuntu-linux/mxnet-ssd/tools/find_mxnet.py", line 15, in <module>
    import mxnet as mx
  File "/home/ubuntu-linux/mxnet-ssd/tools/../mxnet/python/mxnet/__init__.py", line 7, in <module>
    from .base import MXNetError
  File "/home/ubuntu-linux/mxnet-ssd/tools/../mxnet/python/mxnet/base.py", line 52, in <module>
    _LIB = _load_lib()
  File "/home/ubuntu-linux/mxnet-ssd/tools/../mxnet/python/mxnet/base.py", line 43, in _load_lib
    lib_path = libinfo.find_lib_path()
  File "/home/ubuntu-linux/mxnet-ssd/tools/../mxnet/python/mxnet/libinfo.py", line 42, in find_lib_path
    'List of candidates:\n' + str('\n'.join(dll_path)))
RuntimeError: Cannot find the files.
List of candidates:
/home/ubuntu-linux/mxnet-ssd/mxnet/python/mxnet/libmxnet.so
/home/ubuntu-linux/mxnet-ssd/mxnet/python/mxnet/../../lib/libmxnet.so
/home/ubuntu-linux/mxnet-ssd/mxnet/python/mxnet/../../build/Release/libmxnet.so
/usr/local/cuda-8.0/lib64/libmxnet.so
libmxnet.so
../../../libmxnet.so
dark.o
  • 35
  • 8
  • You probably have a version of `mxnet` that is not compatible with `mxnet-ssd`. Upgrade `mxnet`. – phd Jul 06 '17 at 07:56
  • upgraded it and it sort of work but got another error – dark.o Jul 06 '17 at 08:41
  • 'Traceback (most recent call last): File "/home/ubuntu-linux/mxnet-ssd/tools/find_mxnet.py", line 5, in raise ImportError ImportError' – dark.o Jul 06 '17 at 08:42
  • the file that raise error: from __future__ import print_function import os try: if os.environ.get('MXNET_EXAMPLE_SSD_DISABLE_PRE_INSTALLED', 0): raise ImportError import mxnet as mx print("Using mxnet as:") print(mx) – dark.o Jul 06 '17 at 08:52
  • Please add the error into your original question with edits rather than putting them in the comments. – Professor_Joykill Jul 06 '17 at 13:05
  • The error comes from this file: https://github.com/zhreshold/mxnet-ssd/blob/master/tools/find_mxnet.py. Looks like you are expected to export "MXNET_EXAMPLE_SSD_DISABLE_PRE_INSTALLED=1". Did you try that? – Indhu Bharathi Jul 06 '17 at 20:48
  • This is the first time i use stack overflow. Thanks for the tip @Professor_Joykill . How should I export "MXNET_EXAMPLE_SSD_DISABLE_PRE_INSTALLED=1". ? I tried to run this line on the terminal but it didn't workout. – dark.o Jul 07 '17 at 02:08
  • "export MXNET_EXAMPLE_SSD_DISABLE_PRE_INSTALLED=1" from terminal should work. – Indhu Bharathi Jul 10 '17 at 18:57

1 Answers1

0

Looks like the author doesn't want you to use a different version of MXNet than what is included in the project. I see that MXNet is included as a submodule in the project. You should do a recursive clone of the project (git clone --recursive https://github.com/zhreshold/mxnet-ssd.git) and use the version of MXNet that comes with the project.

Remember to export MXNET_EXAMPLE_SSD_DISABLE_PRE_INSTALLED=1 like mentioned in the comments.

Indhu Bharathi
  • 1,437
  • 1
  • 13
  • 22
  • Thanks for the help. (git clone --recursive https://github.com/zhreshold/mxnet-ssd.git ) make the old error go away, but then I got a new one which I added on the origin question. – dark.o Jul 13 '17 at 06:54
  • Got a new problem: I found that I can't type 'cp make/config.mk ./config.mk' in my terminal as the project setup github page suggest. Got this error: ' cp: cannot stat ‘make/config.mk’: No such file or directory'. ' – dark.o Jul 13 '17 at 07:04