0

Just like the title says, I need to set some environment variables, I've gone through the entire Advanced tab and setting but I cant find any option or entry for setting Environment variables, can anyone help me with that?

Note that I'm using Auto Py To Exe in Pycharm terminal using:

$ auto-py-to-exe
Amir reza Riahi
  • 1,540
  • 2
  • 8
  • 34
Adam
  • 21
  • 4
  • You can either set the environment variables from within your python script using the `os` package or through the system from which you run the executable. – Logan Apr 18 '23 at 16:32
  • @Logan I tried to set them through pycharm in the configuration menu and then use os.get method and it works fine when i run it, but when i complete the app installation through auto py to exe the variables that i have set for smtplib no longer works – Adam Apr 18 '23 at 16:53
  • That is because PyCharm is providing the environment when you run the script _through PyCharm_. When you run an executable, the system or shell which you run the executable from is providing the environment. The way these are set depends on the system you are running on. On Windows, which I assume is what you are using, these can be set via the "Control Panel." I'd imagine installers with administrative access can also set system environment variables, but I don't use Windows all that much so I can't say for certain. – Logan Apr 18 '23 at 16:58
  • ok I will try this the next time i get back on my pc and update you – Adam Apr 18 '23 at 17:02

0 Answers0