Virtualbox Ubuntu
In Python Interactive Mode
import tensorflow
I typed
AttributeError: module 'numpy' has no attribute 'bool_'
The error appears.
"When I entered ""import numpy"", there was no error."
Please let me know how to prevent the error.
It's a common mistake as shown in the following article.
You may have created a file called numpy.py
in the current folder, in the Python import destination folder path, or in the folder that is searched before the real numpy exists.
I guess that's why the question error occurred because it was imported.
As you can see in the introduction, don't create files with names that are likely to be used.
How do I resolve when I get module 'XXX' has no attribute 'XXX' on Python
What to do if Python encounters an error AttributeError: module 'xxx' has no attribute 'xxx'
AttributeError: module 'numpy' has no attribute 'core'
for silly reasons
How to fix AttributeError: module 'numpy' has no attribute 'square' closed
Check and add import destination directory paths in Python (for example, sys.path)
© 2024 OneMinuteCode. All rights reserved.