我正在尝试运行此python脚本
import tensorflow as tf
(train_data, train_labels), (test_data, test_labels) = tf.keras.datasets.imbd.load_data(num_words=100000)
train_data[0]
train_labels[0]
我的Python设置有点奇怪。在Mac命令行中:
which pip3
返回/Library/Frameworks/Python.framework/Versions/3.7/bin/pip3
which python3
返回/Library/Frameworks/Python.framework/Versions/3.7/bin/python3
which pip
返回/Library/Frameworks/Python.framework/Versions/3.7/bin/pip
which python
返回/usr/bin/python
所以我尝试使用pip3安装和卸载tensorflow 1.13和tensorflow 2。
然后我尝试使用python3 main.py
我收到以下错误
11901 illegal hardware instruction python3 main.py
^^^此数字每次都会更改。
寻找运行此脚本的方法。