我是python的新手,所以手指交叉这是一个简单的错误!
从Anaconda提示中运行以下代码时,我会收到错误;
python -c "import numpy; numpy.test()"
错误消息是;
FAIL: test_error_message (test_utils.TestEqual)
更多的信息,我的头顶;
File "C:ProgramDataAnaconda22libsite-packagesnumpytestingteststest_utils.py", line 272, in test_error_message
"nArrays are not equalnn"
AssertionError: 'nArrays are not equalnn(shapes (2L,), (1L, 2L) mismatch)n x: array([1, 2])n y: [repr failed for <matrix>: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()]' != 'nArrays are not equalnn(shapes (2,), (1, 2) mismatch)n x: array([1, 2])n y: [repr failed for <matrix>: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()]'
我真的不知道如何解决这个问题。有任何建议吗?
好吧,我不确定为什么有效,但是我卸载了numpy;
conda uninstall numpy
然后用;
重新安装numpyconda install numpy
然后重新安装了卸载numpy时卸载的所有包装;
conda install astropy bottleneck dask datashape distributed h5py matplotlib numba numexpr numpy odo pandas patsy pygpu pytables pywavelets scikit-image scikit-learn scipy seaborn statsmodels theano
宾果游戏,没有更多的失败!