You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/02/12 19:30:33 UTC
[GitHub] [incubator-mxnet] a550461053 opened a new issue #17577: build mxnet
from source and get ImportError: cannot import name 'NDArrayHandle'
a550461053 opened a new issue #17577: build mxnet from source and get ImportError: cannot import name 'NDArrayHandle'
URL: https://github.com/apache/incubator-mxnet/issues/17577
- I build mxnet from source, here's the steps:
```
git clone --recursive https://github.com/apache/incubator-mxnet
cd incubator-mxnet
cp make/config.mk ./
# change config.mk to set: USE_OPENCV=1 USE_BLAS=openblas USE_CUDA=1 USE_CUDA_PATH=/usr/local/cuda USE_CUDNN=1 USE_DIST_KVSTORE=1 USE_NCCL=0
make -j $(nproc)
cd python/ && pip install --user -e .
```
- I got `ImportError: cannot import name 'NDArrayHandle` when I test mxnet in python.
`from mxnet.kvstore import NDArrayHandle`
- Then I list the kvstore class:
1. In release mxnet-cu100:
```
>>> import mxnet.kvstore as kv
>>> dir(kv)
['KVStore', 'KVStoreHandle', 'NDArray', 'NDArrayHandle', '_LIB', '__builtins__', '__doc__', '__file__', '__name__', '__package__', '_ctype_dict', '_ctype_key_value', '_get_kvstore_server_command_type', '_ndarray_cls', '_updater_wrapper', 'absolute_import', 'array', 'c_array', 'c_array_buf', 'c_handle_array', 'c_str', 'c_str_array', 'check_call', 'create', 'ctypes', 'mx_uint', 'opt', 'pickle', 'py_str', 'set_kvstore_handle', 'string_types']
```
2. In my build mxnet:
```
>>> dir(kv) │·
['KVStore', 'KVStoreBase', 'KVStoreServer', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__pa│·
ckage__', '__path__', '__spec__', 'base', 'create', 'kvstore', 'kvstore_server']
```
I want to know why it happen and what's the default `config.mk` of the released mxnet wheel.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-mxnet] samskalicky commented on issue #17577: build
mxnet from source and get ImportError: cannot import name 'NDArrayHandle'
Posted by GitBox <gi...@apache.org>.
samskalicky commented on issue #17577: build mxnet from source and get ImportError: cannot import name 'NDArrayHandle'
URL: https://github.com/apache/incubator-mxnet/issues/17577#issuecomment-586060538
@apeforest any idea on kvstore?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services