Eunbin
Eunbin

Reputation: 41

How to add an environmental variable in the terminal in PyCharm?

I'm currently learning Django through 'real python' website and in the tutorial it asks to add an environmental variable in the terminal like this,

(venv) $ export EMAIL_HOST_USER=your_email_host_user

(for Linus or macOS)

C:\> set EMAIL_HOST_USER=your_email_host_user

(for Windows)

but I'm using PyCharm to code these and these doesn't work in the terminal that PyCharm provides. How do I add environmental variables in PyCharm?

This is the link to what I'm learning to do https://realpython.com/django-user-management/#send-emails-to-the-outside-world

Upvotes: 3

Views: 5440

Answers (2)

Oo.oO
Oo.oO

Reputation: 13385

You can use:

Run/Debug Configuration
  -> Edit configurations ... 
  -> Environment variables

enter image description here

Upvotes: 2

flakes
flakes

Reputation: 23634

Either go to "Run" or the dropdown and select "Edit Configurations..":

enter image description here

For your runtime configuration, select "Environment Variables":

enter image description here

Add as many environment variables as you need:

enter image description here

Upvotes: 0

Related Questions