导入不能用作bat文件但在间谍中起作用

问题描述

我仍然不是最老练的python用户;但我无法克服这个可能简单的问题。我有一个与spyder界面完美配合的代码。我想通过创建一个bat文件来使其成为一项经常性的任务。进而触发cmd接口的bat文件不会导入pandas_data阅读器,并且代码会卡住并中止。

import pandas_datareader.data as web

上面的这一行会在下面创建错误。这是篇冗长的文字

File "C:\Users\myself\anaconda3\lib\site-packages\pandas_datareader\__init__.py",line 2,in <module>
    from .data import (   File "C:\Users\myself\anaconda3\lib\site-packages\pandas_datareader\data.py",line 9,in <module>
    from pandas.util._decorators import deprecate_kwarg   File "C:\Users\myself\anaconda3\lib\site-packages\pandas\__init__.py",line 17,in <module>
    "Unable to import required dependencies:\n" + "\n".join(missing_dependencies) ImportError: Unable to import required dependencies: numpy:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy c-extensions Failed.
- Try uninstalling and reinstalling numpy.
- If you have already done that,then:
  1. Check that you expected to use python3.7 from "C:\Users\myself\anaconda3\python.exe",and that you have no directories in your PATH or PYTHONPATH that can
     interfere with the Python and numpy version "1.17.0" you're trying to use.
  2. If (1) looks fine,you can open a new issue at
     https://github.com/numpy/numpy/issues.  Please include details on:
     - how you installed Python
     - how you installed numpy
     - your operating system
     - whether or not you have multiple versions of Python installed
     - if you built from source,your compiler versions and ideally a build log

- If you're working with a numpy git repository,try `git clean -xdf`
  (removes all files not under version control) and rebuild numpy.

注意:此错误有很多可能的原因,因此请不要评论 与此相关的现有问题-改为打开一个新的问题。

最初的错误是:DLL load Failed: The specified module Could not be found.

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...