Problem with Environment variables on Ubuntu

Hi,

im using Ubuntu 12.04 and want to run some files that import the QSTK library (http://wiki.quantsoftware.org/index.php?title=QuantSoftware_ToolKit) which needs several environment variables to be set.

If I run these files directly from the Terminal/IPython they run fine but if I try to run them from within Pycharm it always throws an "ImportError: No module named qstkutil.qsdateutil".

I dont know why Pycharm cant recognize these variables (I have to admit that I am still new to Ubuntu and i had a similar problem with Spyder too), but even when i try to add these environment variables manually to the interpreter options in Pycharm it still fails.

Any idea what I am doing wrong?

Many thanks!
2 comments
Comment actions Permalink
If you've defined the environment variables in .bash_profile, PyCharm will only see them if you run it from bash (which people normally don't do). Please try defining them in /etc/environment instead.

For more information, please refer to http://askubuntu.com/questions/4667/where-to-declare-environment-variables
1
Comment actions Permalink

 

Dmitry Jemerov thanks !

in ubuntu,

environment variables defined in ~/.bashrc file won't be loaded when start IntelliJ via desktop entry (/usr/local/bin/idea).

after I moved these environment variables into ~/.profile and restart again, it works perfectly.

2

Please sign in to leave a comment.