apache / mxnet

Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more
https://mxnet.apache.org
Apache License 2.0
20.75k stars 6.8k forks source link

mxnet - windows 10 missing module and errors #21035

Open jpinela opened 2 years ago

jpinela commented 2 years ago

Hello Team,

I have tried for the last 2 days to install and get the mxnet tutorial running https://cv.gluon.ai/build/examples_tracking/demo_smot.html#sphx-glr-download-build-examples-tracking-demo-smot-py , with several combinations of packages and package versions, but can't seem to get any progress done. The problem is very vague. I downgraded to python 3.7.9 because 3.8 was just not helping.

the result of the diagnosis script is

C:\Users\Pinela\Desktop>python diagnose.py
----------Python Info----------
Version      : 3.7.9
Compiler     : MSC v.1900 64 bit (AMD64)
Build        : ('tags/v3.7.9:13c94747c7', 'Aug 17 2020 18:58:18')
Arch         : ('64bit', 'WindowsPE')
------------Pip Info-----------
Version      : 22.1
Directory    : C:\Users\Pinela\AppData\Local\Programs\Python\Python37\lib\site-packages\pip
----------MXNet Info-----------
Traceback (most recent call last):
  File "diagnose.py", line 95, in check_mxnet
    import mxnet
  File "C:\Users\Pinela\AppData\Local\Programs\Python\Python37\lib\site-packages\mxnet\__init__.py", line 24, in <module>
    from .context import Context, current_context, cpu, gpu, cpu_pinned
  File "C:\Users\Pinela\AppData\Local\Programs\Python\Python37\lib\site-packages\mxnet\context.py", line 24, in <module>
    from .base import classproperty, with_metaclass, _MXClassPropertyMetaClass
  File "C:\Users\Pinela\AppData\Local\Programs\Python\Python37\lib\site-packages\mxnet\base.py", line 213, in <module>
    _LIB = _load_lib()
  File "C:\Users\Pinela\AppData\Local\Programs\Python\Python37\lib\site-packages\mxnet\base.py", line 204, in _load_lib
    lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_LOCAL)
  File "C:\Users\Pinela\AppData\Local\Programs\Python\Python37\lib\ctypes\__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] Impossível localizar o módulo especificado

----------System Info----------
Platform     : Windows-10-10.0.19041-SP0
system       : Windows
node         : LenovoJP
release      : 10
version      : 10.0.19041
----------Hardware Info----------
machine      : AMD64
processor    : Intel64 Family 6 Model 142 Stepping 10, GenuineIntel
Name
Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz

----------Network Test----------
Setting timeout: 10
Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.1769 sec, LOAD: 0.9422 sec.
Error open Gluon Tutorial(en): http://gluon.mxnet.io, HTTP Error 404: Not Found, DNS finished in 0.22273778915405273 sec.
Error open Gluon Tutorial(cn): https://zh.gluon.ai, <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1091)>, DNS finished in 0.3773517608642578 sec.
Timing for FashionMNIST: https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, DNS: 0.1616 sec, LOAD: 0.9312 sec.
Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.1515 sec, LOAD: 1.0878 sec.
Error open Conda: https://repo.continuum.io/pkgs/free/, HTTP Error 403: Forbidden, DNS finished in 0.17908167839050293 sec.
----------Environment----------

C:\Users\Pinela\Desktop>

nvcc is

C:\Users\Pinela>nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:32:27_Pacific_Daylight_Time_2019
Cuda compilation tools, release 10.2, V10.2.89

C:\Users\Pinela>

I tried this sequence: pip3 install torch pip install opencv-python pip install mxnet-cu102==1.7.0 -f https://dist.mxnet.io/python/cu102 pip3 install gluoncv

then install the nvidia cuda 10.2 drivers installed VS2022

but still getting this error with the GPU

>>> import mxnet as mx
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Pinela\AppData\Local\Programs\Python\Python37\lib\site-packages\mxnet\__init__.py", line 24, in <module>
    from .context import Context, current_context, cpu, gpu, cpu_pinned
  File "C:\Users\Pinela\AppData\Local\Programs\Python\Python37\lib\site-packages\mxnet\context.py", line 24, in <module>
    from .base import classproperty, with_metaclass, _MXClassPropertyMetaClass
  File "C:\Users\Pinela\AppData\Local\Programs\Python\Python37\lib\site-packages\mxnet\base.py", line 213, in <module>
    _LIB = _load_lib()
  File "C:\Users\Pinela\AppData\Local\Programs\Python\Python37\lib\site-packages\mxnet\base.py", line 204, in _load_lib
    lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_LOCAL)
  File "C:\Users\Pinela\AppData\Local\Programs\Python\Python37\lib\ctypes\__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] Impossível localizar o módulo especificado
>>> exit()

the only way to be able to import mxnet is to use the cpu library pip install --upgrade mxnet-mkl

besides that, I have tried several versions of all the components, but haven't been able to get the tutorial test command python demo.py MOT17-13-FRCNN-raw.webm --network-name ssd_512_resnet50_v1_coco --use-pretrained --custom-classes person car --detect-thresh 0.7 --use-motion to run, because it keeps wanting the gpu (saying it was not enabled, running on the cpu library).

I have looked through several issues here, but didn't come to any conclusion.

Could you please point to a group of versions and components that should be able to run the tutorial on windows 10? from what I could see, running on linux would be much easier.

Thanks Team

github-actions[bot] commented 2 years ago

Welcome to Apache MXNet (incubating)! We are on a mission to democratize AI, and we are glad that you are contributing to it by opening this issue. Please make sure to include all the relevant context, and one of the @apache/mxnet-committers will be here shortly. If you are interested in contributing to our project, let us know! Also, be sure to check out our guide on contributing to MXNet and our development guides wiki.