Psycopg2 package installation puzzle in Pycharm - any thoughts?

andydtaylor at gmail.com andydtaylor at gmail.com
Mon Sep 1 01:35:09 CEST 2014


Chris- 

I have removed the second copy of postgres I had (postgres.app) and updated path variables in .bash_profile: 

export PATH=$PATH:/usr/local/share/python 
export PATH=$PATH:/usr/local/bin 
export PYTHONPATH=$PYTHONPATH:/usr/local/bin/python 
export PATH=$PATH:/usr/local/Cellar/postgresql/9.3.5_1/bin 

I don't think I should need the last line because /usr/local/bin/pg_config exists as an alias for /usr/local/Cellar/postgresql/9.3.5_1/bin/pgconfig - do you think I am right? 

I have read that window apps may be unable to pick up environment variables. hence I added the below to the end of my .bash_profile 

launchctl setenv PATH $PATH 

But still Pycharm wasn't having it.  So I have created /etc/launchd.conf and put this in it: 

launchctl setenv PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/python:/usr/local/bin 

Andrea - yes I am using the virtualenv interpreter as the Pycharm project interpreter

Now I am out of ideas..... It's quite maddening! 

Any advice appreciated. 

Thanks, 

Andy 



More information about the Python-list mailing list