nwhitehead / pineapple

http://nwhitehead.github.io/pineapple/
Other
352 stars 26 forks source link

FEATURE: Support psycopg2 #25

Open deeplook opened 9 years ago

deeplook commented 9 years ago

This is amazing, so far! For me it would be wonderful to be able to install psycopg2 as well. When trying to install it in Pineapple-Pro 0.7.4 (Py 2.7) with %pip install psycopg2, I'm getting this

Collecting psycopg2
Installing collected packages: psycopg2
Successfully installed psycopg2-2.6.1
/Applications/Pineapple-Pro.app/Contents/Resources/python2.7/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning

And this when importing psycopg2:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-8-bd284aa2cf56> in <module>()
----> 1 import psycopg2

/Applications/Pineapple-Pro.app/Contents/Resources/python2.7/lib/python2.7/site-packages/psycopg2/__init__.pyc in <module>()
     48 # Import the DBAPI-2.0 stuff into top-level module.
     49 
---> 50 from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID
     51 
     52 from psycopg2._psycopg import Binary, Date, Time, Timestamp

ImportError: dlopen(/Applications/Pineapple-Pro.app/Contents/Resources/python2.7/lib/python2.7/site-packages/psycopg2/_psycopg.so, 2): Library not loaded: libpq.5.dylib
  Referenced from: /Applications/Pineapple-Pro.app/Contents/Resources/python2.7/lib/python2.7/site-packages/psycopg2/_psycopg.so
  Reason: image not found

No idea, what's going wrong here. Is there a chance for it to happen?

nwhitehead commented 9 years ago

From the error message it looks like it thinks it installed it, but there was a problem with one of the dylibs. Probably it used compile tools that are incompatible with the tools I used for building numpy etc. I'll see if a build on my system has the same issue. If it works then I can include psycopg2 in the full version to avoid the issue.

On Thu, Sep 17, 2015 at 8:53 AM, deeplook notifications@github.com wrote:

This is amazing, so far! For me it would be wonderful to be able to install psycopg2 as well. When trying to install it in Pineapple-Pro 0.7.4 (Py 2.7) with %pip install psycopg2, I'm getting this

Collecting psycopg2 Installing collected packages: psycopg2 Successfully installed psycopg2-2.6.1 /Applications/Pineapple-Pro.app/Contents/Resources/python2.7/lib/python2.7/site-packages/pip/vendor/requests/packages/urllib3/util/ssl.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning

And this when importing psycopg2:


ImportError Traceback (most recent call last)

in () ----> 1 import psycopg2 /Applications/Pineapple-Pro.app/Contents/Resources/python2.7/lib/python2.7/site-packages/psycopg2/**init**.pyc in () 48 # Import the DBAPI-2.0 stuff into top-level module. 49 ---> 50 from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID 51 52 from psycopg2._psycopg import Binary, Date, Time, Timestamp ImportError: dlopen(/Applications/Pineapple-Pro.app/Contents/Resources/python2.7/lib/python2.7/site-packages/psycopg2/_psycopg.so, 2): Library not loaded: libpq.5.dylib Referenced from: /Applications/Pineapple-Pro.app/Contents/Resources/python2.7/lib/python2.7/site-packages/psycopg2/_psycopg.so Reason: image not found No idea, what's going wrong here. Is there a chance for it to happen? — Reply to this email directly or view it on GitHub https://github.com/nwhitehead/pineapple/issues/25.
nwhitehead commented 9 years ago

I tried to include psycopg2 but got some error messages about pgconfig.

deeplook commented 9 years ago

These pain points would easily disappear when using a distribution like Anaconda, as described here: https://github.com/nwhitehead/pineapple/issues/24.