Run python code via batch in the anaconda cmd

Asked

Viewed 1,501 times

0

I have a batch created to run a python file, but it is opening the windows cmd and since python is installed in anaconda, does not work, it would run directly from the anaconda cmd as administrator?

start Python c: scrapy cpfl Selenium cpfl.py

1 answer

0

Good evening, what would solve your problem would be to add the current installation of Python (Directory where it is installed on hard drive) to the Windows environment variables.

So you can run programs in cmd:

py py py program.

But how to do that?

If you can’t find where Anaconda Navigator Python is installed, I recommend downloading the . exe version of python Syte.

Here’s a tutorial on how to add Python to the PATH(Environment variables). https://python.org.br/instalacao-windows/

I hope I helped. Good luck!

  • It didn’t work, he doesn’t recognize

Browser other questions tagged

You are not signed in. Login or sign up in order to post.