import mxnet报 'numpy'没有 'histogram_bin_edges'错误

版本 Windows 10 专业版
版本号 20H2
安装日期 ‎2020-‎12-‎29
操作系统内部版本 19042.1237
体验 Windows Feature Experience Pack 120.2212.3530.0

Python:python3.8

电脑概览
电脑型号 联想 20269
操作系统 Microsoft Windows 10 专业版 (64位)
CPU (英特尔)Intel® Core™ i5-4200U CPU @ 1.60GHz(2301 MHz)
主板 联想 Cherry 4A
内存 8.00 GB ( 1600 MHz)
主硬盘 960 GB ( 20QB70MTK501 已使用时间: 3253小时)
显卡 NVIDIA GeForce GT 730M
显示器 联想 N140BGE-EA3 32位真彩色 60Hz
声卡 Realtek High Definition Audio
网卡 Realtek PCIe GBE Family Controller

问题记录:

from mxnet import ndarray
Traceback (most recent call last):
File “”, line 1, in
File “D:\ProgramData\Miniconda3\envs\gluon\lib\site-packages\mxnet_init_.py”, line 33, in
from . import contrib
File “D:\ProgramData\Miniconda3\envs\gluon\lib\site-packages\mxnet\contrib_init_.py”, line 30, in
from . import text
File “D:\ProgramData\Miniconda3\envs\gluon\lib\site-packages\mxnet\contrib\text_init_.py”, line 23, in
from . import embedding
File “D:\ProgramData\Miniconda3\envs\gluon\lib\site-packages\mxnet\contrib\text\embedding.py”, line 36, in
from … import numpy as mx_np
File "D:\ProgramData\Miniconda3\envs\gluon\lib\site-packages\mxnet\numpy_init
.py", line 23, in
from .multiarray import * # pylint: disable=wildcard-import
File “D:\ProgramData\Miniconda3\envs\gluon\lib\site-packages\mxnet\numpy\multiarray.py”, line 48, in
from .fallback import * # pylint: disable=wildcard-import,unused-wildcard-import
File “D:\ProgramData\Miniconda3\envs\gluon\lib\site-packages\mxnet\numpy\fallback.py”, line 132, in
histogram_bin_edges = onp.histogram_bin_edges
AttributeError: module ‘numpy’ has no attribute ‘histogram_bin_edges’

怎样复现问题

装了mxnet的GPU版本以后无法import,又下了mxnet的CPU版本,结果引用的时候出现下图情况

已解决,在base环境中升级好最新版本的numpy,在gluon环境中pip uninstall numpy然后再pip install numpy,gluon环境就会把base环境中较高版本的numpy调用进来,之后顺利from mxnet import nd