0

I've encountered this problem a couple of days ago, which is around time when I updated python and some packages.

  1. scripts run perfectly fine when I'm using Spyder,
  2. scripts run perfectly fine when I'm using Anaconda command prompt and type:

    python 'filepath\filename.py'
    
  3. scripts stop just after the start if I use scheduler (I use TaskTillDawn) or I run a windows shortcut

    python "filepath\filename.py"
    

    that then automatically converts to:

    c:\ProgramData\Anaconda3\python.exe "filepath\filename.py"
    

All of the scripts were running fine before, through shortcuts, schedules etc.

Maybe the solution is obvious, but I don't see it, so any help would be appreciated. If you need more info, just tell me what it is :)

Cheers,

Piotrek
  • 1,400
  • 9
  • 16
  • 1
    May be its helpful to do vise-versa, https://stackoverflow.com/questions/46437863/schedule-a-python-script-via-batch-on-windows-using-anaconda – Saisiva A Nov 08 '19 at 12:26
  • 1
    It may not be enough to simply point to the Anaconda-distribution's Python interpreter since some packages edit the environment variables during env activatiion. Instead, you could try `C:\ProgramData\Anaconda3\Scripts\conda.exe run -n base python 'filepath\filename.py'`. You may need to adjust the path to `conda.exe` since I may not be recalling correctly where it is on Windows. I'm also assuming you are talking about your **base** env. – merv Nov 08 '19 at 15:48

0 Answers0