Skip to content Skip to sidebar Skip to footer

How To Source Additional Environment In Pycharm?

I have a ROS application which has a work space with a setup.bash file and another python script with its own virtual environment. So far this is what I do in my terminal: 1_ pipe

Solution 1:

If you set your virtual environment as your interpreter of choice in PyCharm, it will use that particular virtual environment to run its scripts. However, you can also take advantage of some of the functionality that our run configurations provide.

enter image description here

You can check out the "Before Launch" part of the whole configuration window to enter scripts that you want executed.

Once you've set your configurations, you can then go on to run or debug the configuration. Furthermore, if it is just environment variables that you want to source, you can just put in the environment variables in the "Environment Variables" box.

In case you want to run a shellscript, you will need to create a new shell configuration like so:

enter image description here

Once you've added that configuration, you can then go on to reference it later.

You will now see that you can reference that configuration in question:

enter image description here

enter image description here


Post a Comment for "How To Source Additional Environment In Pycharm?"