numpy - PyCharm 2018.2.4 和 Anaconda 5.3.0
问题描述
我的是 Anaconda 5.3.0
当我在 PyCharm 2018.2.4 中运行 .py 时,为什么它显示:
ImportError:
DLL load failed: The specified module could not be found.
ImportError:
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control). Otherwise reinstall numpy.
Original error was: DLL load failed: The specified module could not be found.
PyCharm 2018.2.4 好像不能导入numpy??
有没有人也看到这个问题?如何解决?非常感谢。
解决方案
如果不是解决方案,我相信我有有用的信息。
我也收到了使用 python 从 Windows 命令提示符导入 numpy 的错误。然后我意识到如果我使用 Anaconda 提示符我可以成功。对差异感到好奇,我退出了 python 并检查了 PATH 环境变量。正如我所希望的,它包含 Windows PATH 中不存在的 Anaconda 引用。在命令提示符下,我键入:path > p.txt 并按回车键创建一个文件,因为字符串太长了。当我在记事本中打开文件时,我将 Anaconda 引用复制到剪贴板(C:\Users\laptop\Anaconda3;C:\Users\laptop\Anaconda3\Library\mingw-w64\bin;C:\Users\laptop\Anaconda3 \Library\usr\bin;C:\Users\laptop\Anaconda3\Library\bin;C:\Users\laptop\Anaconda3\Scripts;C:\Users\laptop\Anaconda3\bin; ) 然后使用系统控制面板下的高级设置来编辑环境变量并将其粘贴到 PATH 的开头。在 Windows shell 和 Pycharm 中,这个问题似乎已经消失了。
推荐阅读
- c# - 如何在 Luis Intent Block 中调用 Dialog 类
- c# - jQuery AJAX 没有在 ASP.NET MVC 中调用 AC# 函数
- node.js - “区域已加载”角度通用 ssr
- jquery - 对话框未使用外部服务在 Iframe 上呈现页面
- android - 一旦显示 InAppMessage 自动消失
- python - Python 首选项查找器 - 如何实现二进制插入排序
- azure - 停止 azure 流分析会停止成本计算吗?
- excel - 如何使用 VBA-excel 聚合不同的 word 文件?
- javascript - 是否可以修改 Set 中的值
- php - php 不断返回黑钻问号