On 2013-11-10, at 1:16 AM, Matthias Fripp <mfr...@gmail.com> wrote:

> I had the same problem. I am trying to make this work on a multi-user 
> machine. My two options seem to be

Neither seem good. I install most required packages which are not handled by 
pip using MacPorts (Homebrew works fine too afaik).

This has several advantages, not the least of which is you can avoid the 
shenanigans happening for your options (1) and (2) below. But the biggest 
advantage for me is that it gives me control over the versioning for the 
packages I am using. If you want to revlock on a version of Postgres, you can 
do that. If you want to run a different version from what Apple is shipping, or 
want to get a security release right away, you can do that. And you don't have 
to go diving down into Apple's library structure to figure out where things 
live or what version you are actually running.

hth

                          - Tom


> 
> (1) Add this line to /etc/profile:
> 
> export DYLD_LIBRARY_PATH=/Library/PostgreSQL/9.3/lib
> 
> The disadvantage of this is that changing DYLD_LIBRARY_PATH doesn't seem to 
> be a common technique on Macs, and I'm not sure whether this would run if 
> python is being used by some specialized account (rather than a normal login 
> account).
> 
> (2) Create symbolic links in /usr/lib :
> 
> sudo ln -s /Library/PostgreSQL/9.3/lib/libpq.5.dylib /usr/lib/libpq.5.dylib
> sudo ln -s /Library/PostgreSQL/9.3/lib/libssl.1.0.0.dylib 
> /usr/lib/libssl.1.0.0.dylib
> sudo ln -s /Library/PostgreSQL/9.3/lib/libcrypto.1.0.0.dylib 
> /usr/lib/libcrypto.1.0.0.dylib
> (It may also have been possible to place these symbolic links in 
> /Library/Python/2.6/site-packages/psycopg2/ , next to _psycopg.so .)
> 
> The disadvantage of using these symbolic links is that it will be harder to 
> maintain when I switch to a new version of PostgreSQL. It was also tedious to 
> find the list of missing dylibs by trial and error (in retrospect, I could 
> have used otools -l /Library/Python/2.6/site-packages/psycopg2/_psycopg.so to 
> get a full list of the libraries needed for psycopg2).
> 
> I would still like to find the "normal" way to add the whole 
> /Library/PostgreSQL/9.3/lib/ directory to the Mac's dynamic library search 
> path, especially for a multi-user machine. Installing PostgreSQL via HomeBrew 
> instead of EnterpriseDB might take care of this automatically?
> 
> Matthias
> 
> On Monday, October 28, 2013 9:54:05 AM UTC-10, Skip Montanaro wrote:
> > I just had this exact same problem and it took me a while to find the 
> > solution. 
> > 
> > On OSx there is a separate library path variable for .dylib library files. 
> > I 
> > added the following to my .bashrc (or.bash_env or however you set up your 
> > shell environment). 
> > 
> > export 
> > DYLD_LIBRARY_PATH="/usr/local/Cellar/openssl/1.0.1e/lib/:$DYLD_LIBRARY_PATH"
> >  
> 
> Thanks for the suggestion. Found libssl in the PostgreSQL installation: 
> 
> % find / -name libssl.1.0.0.dylib 2>/dev/null 
> /Library/PostgreSQL/9.2/lib/libssl.1.0.0.dylib 
> /Library/PostgreSQL/9.2/pgAdmin3.app/Contents/Frameworks/libssl.1.0.0.dylib 
> 
> I guess that makes sense. I should be able to modify the activate 
> script and deactivate function to set/reset DYLD_LIBRARY_PATH 
> appropriately. 
> 
> Skip 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/f914348c-462d-4c86-9fc1-0212e02e4c3b%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Tom Lockhart
tlockhart1...@gmail.com



-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/618B480B-60A0-4305-BAAC-3030359D0523%40gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

<<inline: T_Lockhart_791_email_sig.png>>

Reply via email to