What is the intended way of providing the environment variables to PyCharm?

I would like to run a python code in an Anaconda environment in Ubuntu

The code expects to find some environment variables available in os.environ

The code is not mine, so I will not be editing the code

In a previous version of PyCharm, it was possible to make this work by providing the environment variables in .profile. Currently it does not seem to work. My PyCharm seems to keep a snapshot of the environment variables that at some point were available in .bashrc or  .profile (I know this because I never set them anywhere else), however, it does not seem to update them when I update the corresponding files.

Restarting pycharm does not seem to work.

Could you please tell me the intended solution to providing environment variables. Please don't tell me I have to enter them by hand. There is a large amount of them. I need an automated solution.


Provide environment variables in the configuration dialog for the program.


So, if I have a repository with 20 scripts, do I need to set them up independently for every script, or can I at least do it once per repository? 


Each script has a run profile.  So you will have to set each profile


Lol 21 century IDE. I thought the point of an IDE was to make things easier than console, not harder :D


Please sign in to leave a comment.