AttributeError: module ‘numpy‘ has no attribute ‘object‘

Time:2023-10-12

The one I have is calling some component of numpy in tensorboard and then causing an error.
Tried upgrading numpy but that didn’t work.
The tensorboard version was upgraded later and it worked.

UPDATE: Upgrading the tensorboard can cause other problems, so the above doesn’t work.
The root of this problem is the inconsistent versions of tensorboard and numpy.
My project requires tensorboard to be 2.5.0, and after checking online, compatible numpy can be 1.18.5.
Then this numpy is not compatible with my previously installed version of matplotlib.
So I uninstalled the original matplotlib.
Reinstalled 3.2.2 .

Updated:
If you use pip uninstall, you may not get rid of some of them.
For example, when you delete numpy, the numpy folder is not deleted.
Needs to be manually deleted.
When numpy, tensorboard, matplotlib have all been deleted and manually verified as clean.
Just:

pip install numpy==1.18.5 matplotlib==3.2.2 tensorboard==2.5.0 --target=install_target_dir

Recommended Today

uniapp and applet set tabBar and show and hide tabBar

(1) Set the tabBar: uni.setTabberItem({}); wx.setTabberItem({}); indexnumberisWhich item of the tabBar, counting from the left, is indexed from 0.textstringnoButton text on tabiconPathstringnoImage PathselectedIconPathstringnoImage path when selectedpagePathstringnoPage absolute pathvisiblebooleannotab Whether to display uni.setTabBarItem({ index: 0, text: ‘text’, iconPath: ‘/path/to/iconPath’, selectedIconPath: ‘/path/to/selectedIconPath’, pagePath: ‘pages/home/home’ }) wx.setTabBarItem({ index: 0, text: ‘text’, iconPath: ‘/path/to/iconPath’, selectedIconPath: ‘/path/to/selectedIconPath’, pagePath: ‘pages/home/home’ }) […]