Issues where macports python fails but system python works
David Osguthorpe
david.osguthorpe at gmail.com
Tue May 5 11:39:49 PDT 2009
On Tue, May 05, 2009 at 08:55:46AM -0600, Joshua Root wrote:
> >> result = func(*args)
> >> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urllib2.py", line 1140, in unknown_open
> >> raise URLError('unknown url type: %s' % type)
> >> urllib2.URLError: <urlopen error unknown url type: https>
>
> <http://trac.macports.org/wiki/FAQ#WhycantIimportfooinPython2.5>
>
> You probably need to install py25-socket-ssl. Note that we went with the
> "batteries included" option in python26, and people regularly complain
> about that too:
>
> <http://trac.macports.org/wiki/FAQ#pydeps>
>
> If you're seeing an error like the above when running something
> installed by a port, it's missing a dependency, and you should file a
> ticket.
>
but in this case its not - its some python script I downloaded and have
modified some time ago and has been working perfectly OK so far - and still is
you can put me down for by default when replacing the system python macports
should "replace" the system python (so I dont care about 2.4 or 2.6 pythons because thats
not the system python on Leopard - 2.5 is - a macports user has to specifically request 2.6)
I dont care whether its python-lite python-full - what it should be is python-apple
ie. the same dependencies as Apples python - so I dont get surprises like this
note there is no way I know which python module to install at this point - urllib2.py
seems to be part of the main python install (which is what the script imports)
so has no dependencies defined for it
- I was just beginning to guess that the reason https doesnt exist is probably because
of something wrong in the ssl layer somewhere
- nowhere is there a message about failing to import foo so that FAQ doesnt help
but you are right - you need to install py25-socket-ssl to get the _ssl.so module which
is what seems to be missing (diffing /System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload /opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload
shows the following modules missing in macports
_curses.o, _curses_panel.so, _hashlib.so, _sha256.so, _sha512.so, _sqlite2.so, _ssl.so _tkinter.so
bz2.so readline.so zlib.so)
David
More information about the macports-dev
mailing list