-1

Requirement :- I want my python file to run at windows startup

I am using Anaconda, spyder as IDE. My python file is using a package which running absolutely file when I run on Spyder itself.

Now when I have created a bat file and i have given python exe file and python script along with path

When I run it gives me error that package has not been installed.

so same file running in spyder but when trying to run .bat file it giving me error.

Please guide me how should I achieve this task.

Thank you.

AMC
  • 2,642
  • 7
  • 13
  • 35
Ankit
  • 11
  • 3

1 Answers1

0

You can place a shortcut that runs

C:\Users\<user>\AppData\Local\Microsoft\WindowsApps\python3.exe myfile.py

You can find where your install of python is at with where python3 in a command prompt.

Place the shortcut in shell:startup and will run after all startup programs have run. But since you using your ide's python instance you have to run the python environment source from its, sadly I don't use Spyder IDE and most IDE are closed python environments and are setup within their own terminals.

Toys0125
  • 16
  • 2