Python 2.6.1 urllib error on Mac os x PPC

Attila Soki atiware at
Mon Mar 2 17:12:56 CET 2009


i trying to compile Python 2.6.1 on Mac OS X (ppc).
After configure/make/make install i test the compiled python with
the followig file ( (example from
import urllib
params = urllib.urlencode({'spam': 1, 'eggs': 2, 'bacon': 0})
f = urllib.urlopen("", params)

and i get this error:

python /tmp/ 
Traceback (most recent call last):
  File "/tmp/", line 3, in <module>
    f = urllib.urlopen("", params)
  File "/usr/local/test/python/lib/python2.6/", line 82, in urlopen
    opener = FancyURLopener()
  File "/usr/local/test/python/lib/python2.6/", line 611, in __init__
    URLopener.__init__(self, *args, **kwargs)
  File "/usr/local/test/python/lib/python2.6/", line 129, in __init__
    proxies = getproxies()
  File "/usr/local/test/python/lib/python2.6/", line 1555, in getproxies
    return getproxies_environment() or getproxies_macosx_sysconf()
  File "/usr/local/test/python/lib/python2.6/", line 1449, in getproxies_macosx_sysconf
  File "/usr/local/test/python/lib/python2.6/", line 1330, in _CFSetup
    sc.CFStringCreateWithCString.argtypes = [ c_void_p, c_char_p, c_int32 ]
  File "/usr/local/test/python/lib/python2.6/ctypes/", line 366, in __getattr__
    func = self.__getitem__(name)
  File "/usr/local/test/python/lib/python2.6/ctypes/", line 371, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: dlsym(RTLD_DEFAULT, CFStringCreateWithCString): symbol not found
Exception AttributeError: "FancyURLopener instance has no attribute 'tempcache'" in <bound method FancyURLopener.__del__ of <urllib.FancyURLopener instance at 0x3743a0>> ignored

The same build works on Mac Os X with intel CPU without errors. MAC OS and developertools are the same on both Computer. 

Mac OS X: 10.5.6
Developertools: xcode311_2517
How i build it:

configure --prefix/usr/local/test/python
make install

How i test:

export PYTHONPATH=/usr/local/test/python:/usr/local/test/python/lib/python2.6/site-packages

/usr/local/test/python/bin/ is in the PATH

python /tmp/

please help me to find out why this error occurs.


Attila Soki

Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen:

More information about the Python-list mailing list