'batch to run multiple linked python scripts sequentially, and no NumPy module found, also cannot use another file results
I have multiple python scripts, py1 results used to calculate py2 results, py2 results used to calculate py3 results...
trying to use bat to run these files py1 first and py2 second....... It always shows NumPy not found, also cannot use the results of another script. Anyone can help, really appreciated. Thanks
Code: My python scripts example:
py1: d = int(7) def task(): return int(d) d1 = task()
py2: from py1 import d1
def task_1():
h =5
g2 =h+d1
return g2
g2 = test_1()
py3: from py2 import g2
My Bat file code like this:
@echo off
"C:\Users\name\Anaconda3\python.exe" "C:\Users\name\Desktop\test_auto\py1.py" & "C:\Users\name\Desktop\test_auto\py2.py" & "C:\Users\name\Desktop\test_auto\py3.py" & pause
Solution 1:[1]
Make sure you have had imported NumPy in all your python files. Also here's a link to import the variables from other python file: Import Variable from Python FilePath
Hope I had helped you, If you have any question, you can reply me.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Zateward |
