chapmanb / bcbb

Incubator for useful bioinformatics code, primarily in Python and R
http://bcbio.wordpress.com
604 stars 243 forks source link

import error on Mac OS X #74

Closed ghost closed 11 years ago

ghost commented 11 years ago

Using Homebrew-installed Python 2.7.5. Module was installed using pip install bcbio-gff.

import BCBio.GFF Traceback (most recent call last): File "", line 1, in File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/BCBio/GFF/init.py", line 3, in from GFFParser import GFFParser, DiscoGFFParser, GFFExaminer, parse, parse_simple File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/BCBio/GFF/GFFParser.py", line 22, in import urllib File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 26, in import socket File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 47, in import _socket ImportError: dlopen(/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_socket.so, 2): Symbol not found: __PyInt_AsInt Referenced from: /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_socket.so Expected in: flat namespace in /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_socket.so

roryk commented 11 years ago

It kind of seems like something might be borked with your Python install; it looks like GFFParser.py is dying on 'import urllib'. Does that work normally?

ghost commented 11 years ago

Ah, it looks like I wasn't using the homebrew python. It looks to be working now.