Pj-A 2022-06-19 23:07 采纳率: 80%
浏览 276
已结题

Python报错,这是为啥嘞

这是为啥嘞,找不到错误,求指教

C:\Users\iamat\AppData\Local\Programs\Python\Python39\python.exe "E:/Python-demo/MachineLearning-master/MachineLearning-master/DeepLearning Tutorials/FaceRecognition_CNN(olivettifaces)/use_CNN_olivettifaces.py"
WARNING (theano.configdefaults): g++ not available, if using conda: `conda install m2w64-toolchain`
C:\Users\iamat\AppData\Local\Programs\Python\Python39\lib\site-packages\theano\configdefaults.py:560: UserWarning: DeprecationWarning: there is no c++ compiler.This is deprecated and with Theano 0.11 a c++ compiler will be mandatory
  warnings.warn("DeprecationWarning: there is no c++ compiler."
WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to execute optimized C-implementations (for both CPU and GPU) and will default to Python implementations. Performance will be severely degraded. To remove this warning, set Theano flags cxx to an empty string.
Traceback (most recent call last):
  File "C:\Users\iamat\AppData\Local\Programs\Python\Python39\lib\site-packages\theano\configparser.py", line 168, in fetch_val_for_key
    return theano_cfg.get(section, option)
  File "C:\Users\iamat\AppData\Local\Programs\Python\Python39\lib\configparser.py", line 781, in get
    d = self._unify_values(section, vars)
  File "C:\Users\iamat\AppData\Local\Programs\Python\Python39\lib\configparser.py", line 1149, in _unify_values
    raise NoSectionError(section) from None
configparser.NoSectionError: No section: 'blas'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\iamat\AppData\Local\Programs\Python\Python39\lib\site-packages\theano\configparser.py", line 327, in __get__
    val_str = fetch_val_for_key(self.fullname,
  File "C:\Users\iamat\AppData\Local\Programs\Python\Python39\lib\site-packages\theano\configparser.py", line 172, in fetch_val_for_key
    raise KeyError(key)
KeyError: 'blas.ldflags'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "E:\Python-demo\MachineLearning-master\MachineLearning-master\DeepLearning Tutorials\FaceRecognition_CNN(olivettifaces)\use_CNN_olivettifaces.py", line 19, in <module>
    import theano
  File "C:\Users\iamat\AppData\Local\Programs\Python\Python39\lib\site-packages\theano\__init__.py", line 124, in <module>
    from theano.scan_module import (scan, map, reduce, foldl, foldr, clone,
  File "C:\Users\iamat\AppData\Local\Programs\Python\Python39\lib\site-packages\theano\scan_module\__init__.py", line 41, in <module>
    from theano.scan_module import scan_opt
  File "C:\Users\iamat\AppData\Local\Programs\Python\Python39\lib\site-packages\theano\scan_module\scan_opt.py", line 60, in <module>
    from theano import tensor, scalar
  File "C:\Users\iamat\AppData\Local\Programs\Python\Python39\lib\site-packages\theano\tensor\__init__.py", line 17, in <module>
    from theano.tensor import blas
  File "C:\Users\iamat\AppData\Local\Programs\Python\Python39\lib\site-packages\theano\tensor\blas.py", line 155, in <module>
    from theano.tensor.blas_headers import blas_header_text
  File "C:\Users\iamat\AppData\Local\Programs\Python\Python39\lib\site-packages\theano\tensor\blas_headers.py", line 987, in <module>
    if not config.blas.ldflags:
  File "C:\Users\iamat\AppData\Local\Programs\Python\Python39\lib\site-packages\theano\configparser.py", line 332, in __get__
    val_str = self.default()
  File "C:\Users\iamat\AppData\Local\Programs\Python\Python39\lib\site-packages\theano\configdefaults.py", line 1284, in default_blas_ldflags
    blas_info = np.distutils.__config__.blas_opt_info
AttributeError: module 'numpy.distutils.__config__' has no attribute 'blas_opt_info'

Process finished with exit code 1


  • 写回答

1条回答 默认 最新

  • Pj-A 2022-06-19 23:37
    关注

    numpy版本不对,换成1.19.3就可以了

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 6月27日
  • 已采纳回答 6月19日
  • 创建了问题 6月19日

悬赏问题

  • ¥188 寻找能做王者评分提取的
  • ¥15 matlab用simulink求解一个二阶微分方程,要求截图
  • ¥30 乘子法解约束最优化问题的matlab代码文件,最好有matlab代码文件
  • ¥15 写论文,需要数据支撑
  • ¥15 identifier of an instance of 类 was altered from xx to xx错误
  • ¥100 反编译微信小游戏求指导
  • ¥15 docker模式webrtc-streamer 无法播放公网rtsp
  • ¥15 学不会递归,理解不了汉诺塔参数变化
  • ¥15 基于图神经网络的COVID-19药物筛选研究
  • ¥30 软件自定义无线电该怎样使用