Search code examples
pythoncurlpython-3.3

how to install curl in latest python?


When I'm googling everywhere it is pointed to http://pycurl.sourceforge.net/

but when I try to install this package I get :

d:\pycurl>setup.py -install d:\curl\
  File "d:\pycurl\setup.py", line 58
    print "FATAL: bad directory %s in environment variable %s" % (dir, envvar)
                                                             ^
SyntaxError: invalid syntax

Solution

  • The package is not compatible with Python 3; you'll have to request the author ports it. There is an existing patch you could try out.

    In the meantime, look into other libraries instead, the requests library does support Python 3 and has a far superior API to pycurl.