anacondaプロンプトではpyファイルを実行することができますが、cmdでは実行がうまくいかないです。
<python.exeがあるpath>python ファイル名.pyで実行すると、下記のエラー文章が表示されます。
C:\Users\gares\anaconda3>python test01.py
C:\Users\gares\anaconda3\lib\site-packages\numpy_init_.py:143: UserWarning: mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out-of-the box operation under condition when Gnu OpenMP had already been loaded by Python process is not assured. Please install mkl-service package, see http://github.com/IntelPython/mkl-service
from . import distributor_init
Traceback (most recent call last):
File "C:\Users\gares\anaconda3\test01.py", line 1, in <module>
import pandas as pd
File "C:\Users\gares\anaconda3\lib\site-packages\pandas_init.py", line 16, in <module>
raise ImportError(
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. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
- The Python version is: Python3.9 from "C:\Users\gares\anaconda3\python.exe"
- The NumPy version is: "1.20.3"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: DLL load failed while importing _multiarray_umath: 指定されたモジュールが見つかりません。
また、タスクスケジューラを使用して、定期実行も試みましたが、pyファイルが一瞬開いてすぐ閉じます。
結局実行はされておりません。
環境変数もpython.exeがあるpathを指定しておりますが、うまくできません。
pythonを個別でインストールし直す方がいいのでしょうか。