", line 1, in file">", line 1, in File "D:\JetBrains\PyCharm 2019.1.3\helpers\pydev\_pydev_bundle\pydev_umd.py", line 197, in runfile pydev_imports.execfile(filename, global_vars, local_vars) # e_traceback (mos">
当前位置:   article > 正文

【机器学习】Traceback (most recent call last): File “<input>“, line 1, in <module> File “D:\JetBrains\_traceback (most recent call last): file "",

traceback (most recent call last): file "", line 1, in file

报错

Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "D:\JetBrains\PyCharm 2019.1.3\helpers\pydev\_pydev_bundle\pydev_umd.py", line 197, in runfile
    pydev_imports.execfile(filename, global_vars, local_vars)  # execute the script
  File "D:\JetBrains\PyCharm 2019.1.3\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "F:\2022\机器学习\learn\1_4\learnNumpy.py", line 1, in <module>
    import numpy as np
  File "D:\JetBrains\PyCharm 2019.1.3\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'numpy'
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

大概是之前下载了半天也没下载上……

解决方法

我用的是pycharm

  1. 打开file->settings
    在这里插入图片描述

  2. 点击Project:xx/project interpreter,双击pip
    在这里插入图片描述
    3.在搜索框搜索然后下载
    在这里插入图片描述

  3. 如果速度太慢可以添加https://pypi.douban.com/simple
    在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/278412
推荐阅读
相关标签