Trouble installing pycurl on Mac OS X 10.6.8 - python
I am working on a python project (I have python 2.7) that uses the eBay SDK module found here: https://github.com/timotheus/ebaysdk-python
I was able to install ebaysdk but had trouble when running my program that imports it:
Nicole-MacBook-Air:python nicole$ python ebayToHTML.py
Traceback (most recent call last):
File "ebayToHTML.py", line 2, in <module>
from ebaysdk import finding
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ebaysdk-0.1.7-py2.7.egg/ebaysdk/__init__.py", line 3, in <module>
import yaml, pycurl, urllib
ImportError: No module named pycurl
Before running into this issue, I had to install yaml, which took a little research but eventually worked out. Now, though, I cannot get pycurl to install. I have tried a number of commands such as sudo easy_install pycurl, sudo pip install pycurl, and, from another posted question, sudo env ARCHFLAGS="-arch x86_64" easy_install setuptools pycurl==7.19.0.
All of these give a huge display of ...undeclared errors, which seem to come down to the following message:
src/pycurl.c:61:4: error: src/pycurl.c:61:4: error: #error "Need libcurl version 7.19.0 or greater to compile pycurl."
But it seems that I have this libcurl as necessary (provided this is the way to check for it?):
Nicole-MacBook-Air:python nicole$ curl-config --version
libcurl 7.19.7
Someone else seemed to have a similar issue here: pycurl install :( already have min. libcurl version
...but the answers are a little over my head and I haven't had any luck trying out the different commands given in some of them.
I'm not sure what to do now; is this just a Snow Leopard issue that would be better avoided by (sorry if this is a dumb generalization) just upgrading my OS? I am not very knowledgeable on this and don't know if wrangling with these dependencies will be worth it.
EDIT: Here is the long traceback I get with sudo easy_install pycurl:
Nicole-MacBook-Air:python nicole$ sudo easy_install pycurl
Searching for pycurl
Reading http://pypi.python.org/simple/pycurl/
Reading http://pycurl.sourceforge.net/
Reading http://pycurl.sourceforge.net/download/
Best match: pycurl 7.19.0
Downloading http://pycurl.sourceforge.net/download/pycurl-7.19.0.tar.gz
Processing pycurl-7.19.0.tar.gz
Writing /tmp/easy_install-k4bkjB/pycurl-7.19.0/setup.cfg
Running pycurl-7.19.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-k4bkjB/pycurl-7.19.0/egg-dist-tmp-EB2TOP
Using curl-config (libcurl 7.19.7)
src/pycurl.c:61:4: error: src/pycurl.c:61:4: error: #error "Need libcurl version 7.19.0 or greater to compile pycurl."
src/pycurl.c:85:4: warning: #warning "libcurl was compiled with SSL support, but configure could not determine which " "library was used; thus no SSL crypto locking callbacks will be set, which may " "cause random crashes on SSL requests"
#error "Need libcurl version 7.19.0 or greater to compile pycurl."
src/pycurl.c:85:4: warning: #warning "libcurl was compiled with SSL support, but configure could not determine which " "library was used; thus no SSL crypto locking callbacks will be set, which may " "cause random crashes on SSL requests"
src/pycurl.c:1134: error: syntax error before ‘opensocket_callback’
src/pycurl.c:1134: error: syntax error before ‘curlsocktype’
src/pycurl.c: In function ‘opensocket_callback’:src/pycurl.c:1134: error: syntax error before ‘opensocket_callback’
src/pycurl.c:1134: error: syntax error before ‘curlsocktype’
src/pycurl.c: In function ‘opensocket_callback’:
src/pycurl.c:1142: error: ‘CURL_SOCKET_BAD’ undeclared (first use in this function)
src/pycurl.c:1142: error: (Each undeclared identifier is reported only once
src/pycurl.c:1142: error: for each function it appears in.)
src/pycurl.c:1144: error: ‘clientp’ undeclared (first use in this function)
src/pycurl.c:1148: error: ‘address’ undeclared (first use in this function)
src/pycurl.c:1142: error: ‘CURL_SOCKET_BAD’ undeclared (first use in this function)
src/pycurl.c:1142: error: (Each undeclared identifier is reported only once
src/pycurl.c:1142: error: for each function it appears in.)
src/pycurl.c:1144: error: ‘clientp’ undeclared (first use in this function)
src/pycurl.c:1148: error: ‘address’ undeclared (first use in this function)
src/pycurl.c: In function ‘do_curl_setopt’:
src/pycurl.c:1599: error: ‘CURLOPT_COOKIELIST’ undeclared (first use in this function)
src/pycurl.c:1623: error: ‘CURLOPT_FTP_ALTERNATIVE_TO_USER’ undeclared (first use in this function)
src/pycurl.c:1624: error: ‘CURLOPT_SSH_PUBLIC_KEYFILE’ undeclared (first use in this function)
src/pycurl.c:1625: error: ‘CURLOPT_SSH_PRIVATE_KEYFILE’ undeclared (first use in this function)
src/pycurl.c:1626: error: ‘CURLOPT_COPYPOSTFIELDS’ undeclared (first use in this function)
src/pycurl.c:1627: error: ‘CURLOPT_SSH_HOST_PUBLIC_KEY_MD5’ undeclared (first use in this function)
src/pycurl.c:1628: error: ‘CURLOPT_CRLFILE’ undeclared (first use in this function)
src/pycurl.c:1629: error: ‘CURLOPT_ISSUERCERT’ undeclared (first use in this function)
src/pycurl.c: In function ‘do_curl_setopt’:
src/pycurl.c:1599: error: ‘CURLOPT_COOKIELIST’ undeclared (first use in this function)
src/pycurl.c:1623: error: ‘CURLOPT_FTP_ALTERNATIVE_TO_USER’ undeclared (first use in this function)
src/pycurl.c:1624: error: ‘CURLOPT_SSH_PUBLIC_KEYFILE’ undeclared (first use in this function)
src/pycurl.c:1625: error: ‘CURLOPT_SSH_PRIVATE_KEYFILE’ undeclared (first use in this function)
src/pycurl.c:1626: error: ‘CURLOPT_COPYPOSTFIELDS’ undeclared (first use in this function)
src/pycurl.c:1627: error: ‘CURLOPT_SSH_HOST_PUBLIC_KEY_MD5’ undeclared (first use in this function)
src/pycurl.c:1628: error: ‘CURLOPT_CRLFILE’ undeclared (first use in this function)
src/pycurl.c:1629: error: ‘CURLOPT_ISSUERCERT’ undeclared (first use in this function)
src/pycurl.c:2020: error: nested functions are disabled, use -fnested-functions to re-enable
src/pycurl.c:2020: error: syntax error before ‘opensocket_cb’
src/pycurl.c:2071: error: ‘CURLOPT_OPENSOCKETFUNCTION’ undeclared (first use in this function)
src/pycurl.c:2075: error: ‘opensocket_cb’ undeclared (first use in this function)
src/pycurl.c:2076: error: ‘CURLOPT_OPENSOCKETDATA’ undeclared (first use in this function)
src/pycurl.c:2020: error: nested functions are disabled, use -fnested-functions to re-enable
src/pycurl.c:2020: error: syntax error before ‘opensocket_cb’
src/pycurl.c:2071: error: ‘CURLOPT_OPENSOCKETFUNCTION’ undeclared (first use in this function)
src/pycurl.c:2075: error: ‘opensocket_cb’ undeclared (first use in this function)
src/pycurl.c:2076: error: ‘CURLOPT_OPENSOCKETDATA’ undeclared (first use in this function)
src/pycurl.c: In function ‘do_curl_getinfo’:
src/pycurl.c:2159: error: ‘CURLINFO_LASTSOCKET’ undeclared (first use in this function)
src/pycurl.c:2174: error: ‘CURLINFO_FTP_ENTRY_PATH’ undeclared (first use in this function)
src/pycurl.c:2175: error: ‘CURLINFO_REDIRECT_URL’ undeclared (first use in this function)
src/pycurl.c:2176: error: ‘CURLINFO_PRIMARY_IP’ undeclared (first use in this function)
src/pycurl.c:2194: error: ‘CURLINFO_APPCONNECT_TIME’ undeclared (first use in this function)
src/pycurl.c:2218: error: ‘CURLINFO_COOKIELIST’ undeclared (first use in this function)
src/pycurl.c: At top level:
src/pycurl.c:2341: error: syntax error before ‘curl_socket_t’
src/pycurl.c: In function ‘multi_socket_callback’:
src/pycurl.c:2354: error: ‘userp’ undeclared (first use in this function)
src/pycurl.c:2355: error: ‘easy’ undeclared (first use in this function)
src/pycurl.c:2365: error: ‘socketp’ undeclared (first use in this function)
src/pycurl.c:2371: error: ‘what’ undeclared (first use in this function)
src/pycurl.c:2371: error: ‘s’ undeclared (first use in this function)
src/pycurl.c: In function ‘do_multi_setopt’:
src/pycurl.c:2452: error: ‘CURLMOPT_LASTENTRY’ undeclared (first use in this function)
src/pycurl.c:2461: error: ‘CURLMOPT_PIPELINING’ undeclared (first use in this function)
src/pycurl.c:2464: error: ‘CURLMOPT_MAXCONNECTS’ undeclared (first use in this function)
src/pycurl.c:2479: error: nested functions are disabled, use -fnested-functions to re-enable
src/pycurl.c:2479: error: syntax error before ‘t_cb’
src/pycurl.c:2480: error: nested functions are disabled, use -fnested-functions to re-enable
src/pycurl.c:2480: error: syntax error before ‘s_cb’
src/pycurl.c:2483: error: ‘CURLMOPT_SOCKETFUNCTION’ undeclared (first use in this function)
src/pycurl.c:2484: error: ‘s_cb’ undeclared (first use in this function)
src/pycurl.c:2485: error: ‘CURLMOPT_SOCKETDATA’ undeclared (first use in this function)
src/pycurl.c:2489: error: ‘CURLMOPT_TIMERFUNCTION’ undeclared (first use in this function)
src/pycurl.c:2490: error: ‘t_cb’ undeclared (first use in this function)
src/pycurl.c:2491: error: ‘CURLMOPT_TIMERDATA’ undeclared (first use in this function)
src/pycurl.c: In function ‘do_multi_assign’:
src/pycurl.c:2537: error: ‘curl_socket_t’ undeclared (first use in this function)
src/pycurl.c:2537: error: syntax error before ‘socket’
src/pycurl.c: In function ‘do_multi_socket_action’:
src/pycurl.c:2562: error: ‘curl_socket_t’ undeclared (first use in this function)
src/pycurl.c:2562: error: syntax error before ‘socket’
src/pycurl.c: In function ‘do_curl_getinfo’:
src/pycurl.c:2159: error: ‘CURLINFO_LASTSOCKET’ undeclared (first use in this function)
src/pycurl.c:2174: error: ‘CURLINFO_FTP_ENTRY_PATH’ undeclared (first use in this function)
src/pycurl.c:2175: error: ‘CURLINFO_REDIRECT_URL’ undeclared (first use in this function)
src/pycurl.c:2176: error: ‘CURLINFO_PRIMARY_IP’ undeclared (first use in this function)
src/pycurl.c:2194: error: ‘CURLINFO_APPCONNECT_TIME’ undeclared (first use in this function)
src/pycurl.c:2218: error: ‘CURLINFO_COOKIELIST’ undeclared (first use in this function)
src/pycurl.c: At top level:
src/pycurl.c:2341: error: syntax error before ‘curl_socket_t’
src/pycurl.c: In function ‘multi_socket_callback’:
src/pycurl.c:2354: error: ‘userp’ undeclared (first use in this function)
src/pycurl.c:2355: error: ‘easy’ undeclared (first use in this function)
src/pycurl.c:2365: error: ‘socketp’ undeclared (first use in this function)
src/pycurl.c:2371: error: ‘what’ undeclared (first use in this function)
src/pycurl.c:2371: error: ‘s’ undeclared (first use in this function)
src/pycurl.c: In function ‘do_multi_setopt’:
src/pycurl.c:2452: error: ‘CURLMOPT_LASTENTRY’ undeclared (first use in this function)
src/pycurl.c:2461: error: ‘CURLMOPT_PIPELINING’ undeclared (first use in this function)
src/pycurl.c:2464: error: ‘CURLMOPT_MAXCONNECTS’ undeclared (first use in this function)
src/pycurl.c:2479: error: nested functions are disabled, use -fnested-functions to re-enable
src/pycurl.c:2479: error: syntax error before ‘t_cb’
src/pycurl.c:2480: error: nested functions are disabled, use -fnested-functions to re-enable
src/pycurl.c:2480: error: syntax error before ‘s_cb’
src/pycurl.c:2483: error: ‘CURLMOPT_SOCKETFUNCTION’ undeclared (first use in this function)
src/pycurl.c:2484: error: ‘s_cb’ undeclared (first use in this function)
src/pycurl.c:2485: error: ‘CURLMOPT_SOCKETDATA’ undeclared (first use in this function)
src/pycurl.c:2489: error: ‘CURLMOPT_TIMERFUNCTION’ undeclared (first use in this function)
src/pycurl.c:2490: error: ‘t_cb’ undeclared (first use in this function)
src/pycurl.c:2491: error: ‘CURLMOPT_TIMERDATA’ undeclared (first use in this function)
src/pycurl.c: In function ‘do_multi_assign’:
src/pycurl.c:2537: error: ‘curl_socket_t’ undeclared (first use in this function)
src/pycurl.c:2537: error: syntax error before ‘socket’
src/pycurl.c: In function ‘do_multi_socket_action’:
src/pycurl.c:2562: error: ‘curl_socket_t’ undeclared (first use in this function)
src/pycurl.c:2562: error: syntax error before ‘socket’
src/pycurl.c: In function ‘initpycurl’:
src/pycurl.c:3546: error: ‘CURLE_TFTP_NOTFOUND’ undeclared (first use in this function)
src/pycurl.c:3547: error: ‘CURLE_TFTP_PERM’ undeclared (first use in this function)
src/pycurl.c:3548: error: ‘CURLE_TFTP_DISKFULL’ undeclared (first use in this function)
src/pycurl.c:3549: error: ‘CURLE_TFTP_ILLEGAL’ undeclared (first use in this function)
src/pycurl.c:3550: error: ‘CURLE_TFTP_UNKNOWNID’ undeclared (first use in this function)
src/pycurl.c:3551: error: ‘CURLE_TFTP_EXISTS’ undeclared (first use in this function)
src/pycurl.c:3552: error: ‘CURLE_TFTP_NOSUCHUSER’ undeclared (first use in this function)
src/pycurl.c:3553: error: ‘CURLE_CONV_FAILED’ undeclared (first use in this function)
src/pycurl.c:3554: error: ‘CURLE_CONV_REQD’ undeclared (first use in this function)
src/pycurl.c:3555: error: ‘CURLE_SSL_CACERT_BADFILE’ undeclared (first use in this function)
src/pycurl.c:3556: error: ‘CURLE_REMOTE_FILE_NOT_FOUND’ undeclared (first use in this function)
src/pycurl.c:3557: error: ‘CURLE_SSH’ undeclared (first use in this function)
src/pycurl.c:3558: error: ‘CURLE_SSL_SHUTDOWN_FAILED’ undeclared (first use in this function)
src/pycurl.c:3592: error: ‘CURLFTPMETHOD_DEFAULT’ undeclared (first use in this function)
src/pycurl.c:3593: error: ‘CURLFTPMETHOD_MULTICWD’ undeclared (first use in this function)
src/pycurl.c:3594: error: ‘CURLFTPMETHOD_NOCWD’ undeclared (first use in this function)
src/pycurl.c:3595: error: ‘CURLFTPMETHOD_SINGLECWD’ undeclared (first use in this function)
src/pycurl.c:3707: error: ‘CURLOPT_OPENSOCKETFUNCTION’ undeclared (first use in this function)
src/pycurl.c:3709: error: ‘CURLOPT_IGNORE_CONTENT_LENGTH’ undeclared (first use in this function)
src/pycurl.c:3710: error: ‘CURLOPT_COOKIELIST’ undeclared (first use in this function)
src/pycurl.c:3711: error: ‘CURLOPT_FTP_SKIP_PASV_IP’ undeclared (first use in this function)
src/pycurl.c:3712: error: ‘CURLOPT_FTP_FILEMETHOD’ undeclared (first use in this function)
src/pycurl.c:3713: error: ‘CURLOPT_CONNECT_ONLY’ undeclared (first use in this function)
src/pycurl.c:3714: error: ‘CURLOPT_LOCALPORT’ undeclared (first use in this function)
src/pycurl.c:3715: error: ‘CURLOPT_LOCALPORTRANGE’ undeclared (first use in this function)
src/pycurl.c:3716: error: ‘CURLOPT_FTP_ALTERNATIVE_TO_USER’ undeclared (first use in this function)
src/pycurl.c:3717: error: ‘CURLOPT_MAX_SEND_SPEED_LARGE’ undeclared (first use in this function)
src/pycurl.c:3718: error: ‘CURLOPT_MAX_RECV_SPEED_LARGE’ undeclared (first use in this function)
src/pycurl.c:3719: error: ‘CURLOPT_SSL_SESSIONID_CACHE’ undeclared (first use in this function)
src/pycurl.c:3720: error: ‘CURLOPT_SSH_AUTH_TYPES’ undeclared (first use in this function)
src/pycurl.c:3721: error: ‘CURLOPT_SSH_PUBLIC_KEYFILE’ undeclared (first use in this function)
src/pycurl.c:3722: error: ‘CURLOPT_SSH_PRIVATE_KEYFILE’ undeclared (first use in this function)
src/pycurl.c:3723: error: ‘CURLOPT_FTP_SSL_CCC’ undeclared (first use in this function)
src/pycurl.c:3724: error: ‘CURLOPT_TIMEOUT_MS’ undeclared (first use in this function)
src/pycurl.c:3725: error: ‘CURLOPT_CONNECTTIMEOUT_MS’ undeclared (first use in this function)
src/pycurl.c:3726: error: ‘CURLOPT_HTTP_TRANSFER_DECODING’ undeclared (first use in this function)
src/pycurl.c:3727: error: ‘CURLOPT_HTTP_CONTENT_DECODING’ undeclared (first use in this function)
src/pycurl.c:3728: error: ‘CURLOPT_NEW_FILE_PERMS’ undeclared (first use in this function)
src/pycurl.c:3729: error: ‘CURLOPT_NEW_DIRECTORY_PERMS’ undeclared (first use in this function)
src/pycurl.c:3730: error: ‘CURLOPT_POST301’ undeclared (first use in this function)
src/pycurl.c:3731: error: ‘CURLOPT_PROXY_TRANSFER_MODE’ undeclared (first use in this function)
src/pycurl.c:3732: error: ‘CURLOPT_COPYPOSTFIELDS’ undeclared (first use in this function)
src/pycurl.c:3733: error: ‘CURLOPT_SSH_HOST_PUBLIC_KEY_MD5’ undeclared (first use in this function)
src/pycurl.c:3735: error: ‘CURLOPT_CRLFILE’ undeclared (first use in this function)
src/pycurl.c:3736: error: ‘CURLOPT_ISSUERCERT’ undeclared (first use in this function)
src/pycurl.c:3737: error: ‘CURLOPT_ADDRESS_SCOPE’ undeclared (first use in this function)
src/pycurl.c:3739: error: ‘CURLMOPT_TIMERFUNCTION’ undeclared (first use in this function)
src/pycurl.c:3740: error: ‘CURLMOPT_SOCKETFUNCTION’ undeclared (first use in this function)
src/pycurl.c:3741: error: ‘CURLMOPT_PIPELINING’ undeclared (first use in this function)
src/pycurl.c:3742: error: ‘CURLMOPT_MAXCONNECTS’ undeclared (first use in this function)
src/pycurl.c:3773: error: ‘CURLSSH_AUTH_ANY’ undeclared (first use in this function)
src/pycurl.c:3774: error: ‘CURLSSH_AUTH_NONE’ undeclared (first use in this function)
src/pycurl.c:3775: error: ‘CURLSSH_AUTH_PUBLICKEY’ undeclared (first use in this function)
src/pycurl.c:3776: error: ‘CURLSSH_AUTH_PASSWORD’ undeclared (first use in this function)
src/pycurl.c:3777: error: ‘CURLSSH_AUTH_HOST’ undeclared (first use in this function)
src/pycurl.c:3778: error: ‘CURLSSH_AUTH_KEYBOARD’ undeclared (first use in this function)
src/pycurl.c:3779: error: ‘CURLSSH_AUTH_DEFAULT’ undeclared (first use in this function)
src/pycurl.c:3788: error: ‘CURLINFO_APPCONNECT_TIME’ undeclared (first use in this function)
src/pycurl.c:3804: error: ‘CURLINFO_REDIRECT_URL’ undeclared (first use in this function)
src/pycurl.c:3805: error: ‘CURLINFO_PRIMARY_IP’ undeclared (first use in this function)
src/pycurl.c:3812: error: ‘CURLINFO_COOKIELIST’ undeclared (first use in this function)
src/pycurl.c:3813: error: ‘CURLINFO_LASTSOCKET’ undeclared (first use in this function)
src/pycurl.c:3814: error: ‘CURLINFO_FTP_ENTRY_PATH’ undeclared (first use in this function)
src/pycurl.c:3825: error: ‘CURL_CSELECT_IN’ undeclared (first use in this function)
src/pycurl.c:3826: error: ‘CURL_CSELECT_OUT’ undeclared (first use in this function)
src/pycurl.c:3827: error: ‘CURL_CSELECT_ERR’ undeclared (first use in this function)
src/pycurl.c:3828: error: ‘CURL_SOCKET_TIMEOUT’ undeclared (first use in this function)
src/pycurl.c:3829: error: ‘CURL_POLL_NONE’ undeclared (first use in this function)
src/pycurl.c:3830: error: ‘CURL_POLL_IN’ undeclared (first use in this function)
src/pycurl.c:3831: error: ‘CURL_POLL_OUT’ undeclared (first use in this function)
src/pycurl.c:3832: error: ‘CURL_POLL_INOUT’ undeclared (first use in this function)
src/pycurl.c:3833: error: ‘CURL_POLL_REMOVE’ undeclared (first use in this function)
src/pycurl.c: In function ‘initpycurl’:
src/pycurl.c:3546: error: ‘CURLE_TFTP_NOTFOUND’ undeclared (first use in this function)
src/pycurl.c:3547: error: ‘CURLE_TFTP_PERM’ undeclared (first use in this function)
src/pycurl.c:3548: error: ‘CURLE_TFTP_DISKFULL’ undeclared (first use in this function)
src/pycurl.c:3549: error: ‘CURLE_TFTP_ILLEGAL’ undeclared (first use in this function)
src/pycurl.c:3550: error: ‘CURLE_TFTP_UNKNOWNID’ undeclared (first use in this function)
src/pycurl.c:3551: error: ‘CURLE_TFTP_EXISTS’ undeclared (first use in this function)
src/pycurl.c:3552: error: ‘CURLE_TFTP_NOSUCHUSER’ undeclared (first use in this function)
src/pycurl.c:3553: error: ‘CURLE_CONV_FAILED’ undeclared (first use in this function)
src/pycurl.c:3554: error: ‘CURLE_CONV_REQD’ undeclared (first use in this function)
src/pycurl.c:3555: error: ‘CURLE_SSL_CACERT_BADFILE’ undeclared (first use in this function)
src/pycurl.c:3556: error: ‘CURLE_REMOTE_FILE_NOT_FOUND’ undeclared (first use in this function)
src/pycurl.c:3557: error: ‘CURLE_SSH’ undeclared (first use in this function)
src/pycurl.c:3558: error: ‘CURLE_SSL_SHUTDOWN_FAILED’ undeclared (first use in this function)
src/pycurl.c:3592: error: ‘CURLFTPMETHOD_DEFAULT’ undeclared (first use in this function)
src/pycurl.c:3593: error: ‘CURLFTPMETHOD_MULTICWD’ undeclared (first use in this function)
src/pycurl.c:3594: error: ‘CURLFTPMETHOD_NOCWD’ undeclared (first use in this function)
src/pycurl.c:3595: error: ‘CURLFTPMETHOD_SINGLECWD’ undeclared (first use in this function)
src/pycurl.c:3707: error: ‘CURLOPT_OPENSOCKETFUNCTION’ undeclared (first use in this function)
src/pycurl.c:3709: error: ‘CURLOPT_IGNORE_CONTENT_LENGTH’ undeclared (first use in this function)
src/pycurl.c:3710: error: ‘CURLOPT_COOKIELIST’ undeclared (first use in this function)
src/pycurl.c:3711: error: ‘CURLOPT_FTP_SKIP_PASV_IP’ undeclared (first use in this function)
src/pycurl.c:3712: error: ‘CURLOPT_FTP_FILEMETHOD’ undeclared (first use in this function)
src/pycurl.c:3713: error: ‘CURLOPT_CONNECT_ONLY’ undeclared (first use in this function)
src/pycurl.c:3714: error: ‘CURLOPT_LOCALPORT’ undeclared (first use in this function)
src/pycurl.c:3715: error: ‘CURLOPT_LOCALPORTRANGE’ undeclared (first use in this function)
src/pycurl.c:3716: error: ‘CURLOPT_FTP_ALTERNATIVE_TO_USER’ undeclared (first use in this function)
src/pycurl.c:3717: error: ‘CURLOPT_MAX_SEND_SPEED_LARGE’ undeclared (first use in this function)
src/pycurl.c:3718: error: ‘CURLOPT_MAX_RECV_SPEED_LARGE’ undeclared (first use in this function)
src/pycurl.c:3719: error: ‘CURLOPT_SSL_SESSIONID_CACHE’ undeclared (first use in this function)
src/pycurl.c:3720: error: ‘CURLOPT_SSH_AUTH_TYPES’ undeclared (first use in this function)
src/pycurl.c:3721: error: ‘CURLOPT_SSH_PUBLIC_KEYFILE’ undeclared (first use in this function)
src/pycurl.c:3722: error: ‘CURLOPT_SSH_PRIVATE_KEYFILE’ undeclared (first use in this function)
src/pycurl.c:3723: error: ‘CURLOPT_FTP_SSL_CCC’ undeclared (first use in this function)
src/pycurl.c:3724: error: ‘CURLOPT_TIMEOUT_MS’ undeclared (first use in this function)
src/pycurl.c:3725: error: ‘CURLOPT_CONNECTTIMEOUT_MS’ undeclared (first use in this function)
src/pycurl.c:3726: error: ‘CURLOPT_HTTP_TRANSFER_DECODING’ undeclared (first use in this function)
src/pycurl.c:3727: error: ‘CURLOPT_HTTP_CONTENT_DECODING’ undeclared (first use in this function)
src/pycurl.c:3728: error: ‘CURLOPT_NEW_FILE_PERMS’ undeclared (first use in this function)
src/pycurl.c:3729: error: ‘CURLOPT_NEW_DIRECTORY_PERMS’ undeclared (first use in this function)
src/pycurl.c:3730: error: ‘CURLOPT_POST301’ undeclared (first use in this function)
src/pycurl.c:3731: error: ‘CURLOPT_PROXY_TRANSFER_MODE’ undeclared (first use in this function)
src/pycurl.c:3732: error: ‘CURLOPT_COPYPOSTFIELDS’ undeclared (first use in this function)
src/pycurl.c:3733: error: ‘CURLOPT_SSH_HOST_PUBLIC_KEY_MD5’ undeclared (first use in this function)
src/pycurl.c:3735: error: ‘CURLOPT_CRLFILE’ undeclared (first use in this function)
src/pycurl.c:3736: error: ‘CURLOPT_ISSUERCERT’ undeclared (first use in this function)
src/pycurl.c:3737: error: ‘CURLOPT_ADDRESS_SCOPE’ undeclared (first use in this function)
src/pycurl.c:3739: error: ‘CURLMOPT_TIMERFUNCTION’ undeclared (first use in this function)
src/pycurl.c:3740: error: ‘CURLMOPT_SOCKETFUNCTION’ undeclared (first use in this function)
src/pycurl.c:3741: error: ‘CURLMOPT_PIPELINING’ undeclared (first use in this function)
src/pycurl.c:3742: error: ‘CURLMOPT_MAXCONNECTS’ undeclared (first use in this function)
src/pycurl.c:3773: error: ‘CURLSSH_AUTH_ANY’ undeclared (first use in this function)
src/pycurl.c:3774: error: ‘CURLSSH_AUTH_NONE’ undeclared (first use in this function)
src/pycurl.c:3775: error: ‘CURLSSH_AUTH_PUBLICKEY’ undeclared (first use in this function)
src/pycurl.c:3776: error: ‘CURLSSH_AUTH_PASSWORD’ undeclared (first use in this function)
src/pycurl.c:3777: error: ‘CURLSSH_AUTH_HOST’ undeclared (first use in this function)
src/pycurl.c:3778: error: ‘CURLSSH_AUTH_KEYBOARD’ undeclared (first use in this function)
src/pycurl.c:3779: error: ‘CURLSSH_AUTH_DEFAULT’ undeclared (first use in this function)
src/pycurl.c:3788: error: ‘CURLINFO_APPCONNECT_TIME’ undeclared (first use in this function)
src/pycurl.c:3804: error: ‘CURLINFO_REDIRECT_URL’ undeclared (first use in this function)
src/pycurl.c:3805: error: ‘CURLINFO_PRIMARY_IP’ undeclared (first use in this function)
src/pycurl.c:3812: error: ‘CURLINFO_COOKIELIST’ undeclared (first use in this function)
src/pycurl.c:3813: error: ‘CURLINFO_LASTSOCKET’ undeclared (first use in this function)
src/pycurl.c:3814: error: ‘CURLINFO_FTP_ENTRY_PATH’ undeclared (first use in this function)
src/pycurl.c:3825: error: ‘CURL_CSELECT_IN’ undeclared (first use in this function)
src/pycurl.c:3826: error: ‘CURL_CSELECT_OUT’ undeclared (first use in this function)
src/pycurl.c:3827: error: ‘CURL_CSELECT_ERR’ undeclared (first use in this function)
src/pycurl.c:3828: error: ‘CURL_SOCKET_TIMEOUT’ undeclared (first use in this function)
src/pycurl.c:3829: error: ‘CURL_POLL_NONE’ undeclared (first use in this function)
src/pycurl.c:3830: error: ‘CURL_POLL_IN’ undeclared (first use in this function)
src/pycurl.c:3831: error: ‘CURL_POLL_OUT’ undeclared (first use in this function)
src/pycurl.c:3832: error: ‘CURL_POLL_INOUT’ undeclared (first use in this function)
src/pycurl.c:3833: error: ‘CURL_POLL_REMOVE’ undeclared (first use in this function)
lipo: can't figure out the architecture type of: /var/tmp//cc1gGI6G.out
error: Setup script exited with error: command 'gcc-4.0' failed with exit status 1
In case it helps, here is this, too. It says it cannot find it, and nothing more :( :
Nicole-MacBook-Air:python nicole$ sudo port install py27-curl
Error: Port py27-curl not found
EDIT 2: Finally, I supposedly installed pycurl successfully:
Nicole-MacBook-Air:python nicole$ sudo port install py27-curl
Password:
---> Computing dependencies for py27-curl
---> Dependencies to be installed: curl curl-ca-bundle
---> Fetching archive for curl-ca-bundle
---> Attempting to fetch curl-ca-bundle-7.30.0_0.darwin_10.noarch.tbz2 from http://packages.macports.org/curl-ca-bundle
---> Attempting to fetch curl-ca-bundle-7.30.0_0.darwin_10.noarch.tbz2.rmd160 from http://packages.macports.org/curl-ca-bundle
---> Installing curl-ca-bundle #7.30.0_0
---> Activating curl-ca-bundle #7.30.0_0
---> Cleaning curl-ca-bundle
---> Fetching archive for curl
---> Attempting to fetch curl-7.30.0_0+ssl.darwin_10.x86_64.tbz2 from http://packages.macports.org/curl
---> Attempting to fetch curl-7.30.0_0+ssl.darwin_10.x86_64.tbz2.rmd160 from http://packages.macports.org/curl
---> Installing curl #7.30.0_0+ssl
---> Activating curl #7.30.0_0+ssl
---> Cleaning curl
---> Fetching archive for py27-curl
---> Attempting to fetch py27-curl-7.19.0_0.darwin_10.x86_64.tbz2 from http://packages.macports.org/py27-curl
---> Attempting to fetch py27-curl-7.19.0_0.darwin_10.x86_64.tbz2.rmd160 from http://packages.macports.org/py27-curl
---> Installing py27-curl #7.19.0_0
---> Activating py27-curl #7.19.0_0
---> Cleaning py27-curl
---> Updating database of binaries: 100.0%
---> Scanning binaries for linking errors: 100.0%
---> No broken files found.
But then this! :
Nicole-MacBook-Air:python nicole$ python
Python 2.7.4 (v2.7.4:026ee0057e2d, Apr 6 2013, 10:15:50)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pycurl
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named pycurl
What is going on here?
You possibly have two python installations, one that comes with MacBookPro in /usr/bin/python and the other defaulted by macports to /opt/local/bin/python.
Try this if this works:
sudo port install py27-yaml
sudo port install py27-curl
/opt/local/bin/python2.7
import pycurl
while installing pycurl with easy_install i have faced the error which is posted here, so i have tried macports.. .on 10.6.8.. .and it has been installed successfully and working::
Namit-Kewats-MacBook:~ namitkewat$ sudo port install py27-curl
Warning: port definitions are more than two weeks old, consider using selfupdate
---> Computing dependencies for py27-curl
---> Fetching archive for py27-curl
---> Attempting to fetch py27-curl-7.19.0_0.darwin_10.x86_64.tbz2 from http://lil.fr.packages.macports.org/py27-curl
---> Attempting to fetch py27-curl-7.19.0_0.darwin_10.x86_64.tbz2.rmd160 from http://lil.fr.packages.macports.org/py27-curl
---> Installing py27-curl #7.19.0_0
---> Activating py27-curl #7.19.0_0
---> Cleaning py27-curl
---> Updating database of binaries: 100.0%
---> Scanning binaries for linking errors: 100.0%
---> No broken files found.
Namit-Kewats-MacBook:~ namitkewat$ python
Python 2.7.3 (default, Oct 22 2012, 06:12:28)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pycurl
>>>
Also to install yaml is very easy with macports, just run sudo port install py27-yaml in your terminal.. .
This worked for me on OSX 10.8.3, which is backwards from the pycurl documentation
sudo python setup.py install --with-ssl --curl-config=/usr/bin/curl-config
Related
error: "gcc ... " failed with exit status 1 when I install pygsl on Ubuntu 12.04
When I was running "python setup.py build", the errors were below, and the gsl version is gsl_1.16 pygsl version is pygsl-2.3.0 testing/src/sf/sf__data.c: At top level: testing/src/sf/sf__data.c:3010:53: error: ‘gsl_sf_mathieu_a_e’ undeclared here (not in a function) testing/src/sf/sf__data.c:3024:53: error: ‘gsl_sf_mathieu_b_e’ undeclared here (not in a function) testing/src/sf/sf__data.c:3024:1: error: initializer element is not constant testing/src/sf/sf__data.c:3024:1: error: (near initialization for ‘gsl_sf_mathieu_b_e_data[0]’) testing/src/sf/sf__data.c:3024:1: error: initializer element is not constant testing/src/sf/sf__data.c:3024:1: error: (near initialization for ‘gsl_sf_mathieu_b_e_data[1]’) testing/src/sf/sf__data.c:3038:54: error: ‘gsl_sf_mathieu_ce_e’ undeclared here (not in a function) testing/src/sf/sf__data.c:3038:1: error: initializer element is not constant testing/src/sf/sf__data.c:3038:1: error: (near initialization for ‘gsl_sf_mathieu_ce_e_data[0]’) testing/src/sf/sf__data.c:3038:1: error: initializer element is not constant testing/src/sf/sf__data.c:3038:1: error: (near initialization for ‘gsl_sf_mathieu_ce_e_data[1]’) testing/src/sf/sf__data.c:3052:54: error: ‘gsl_sf_mathieu_se_e’ undeclared here (not in a function) testing/src/sf/sf__data.c:3052:1: error: initializer element is not constant testing/src/sf/sf__data.c:3052:1: error: (near initialization for ‘gsl_sf_mathieu_se_e_data[0]’) testing/src/sf/sf__data.c:3052:1: error: initializer element is not constant testing/src/sf/sf__data.c:3052:1: error: (near initialization for ‘gsl_sf_mathieu_se_e_data[1]’) testing/src/sf/sf__data.c:3066:54: error: ‘gsl_sf_mathieu_Mc_e’ undeclared here (not in a function) testing/src/sf/sf__data.c:3066:1: error: initializer element is not constant testing/src/sf/sf__data.c:3066:1: error: (near initialization for ‘gsl_sf_mathieu_Mc_e_data[0]’) testing/src/sf/sf__data.c:3066:1: error: initializer element is not constant testing/src/sf/sf__data.c:3066:1: error: (near initialization for ‘gsl_sf_mathieu_Mc_e_data[1]’) testing/src/sf/sf__data.c:3080:54: error: ‘gsl_sf_mathieu_Ms_e’ undeclared here (not in a function) testing/src/sf/sf__data.c:3080:1: error: initializer element is not constant testing/src/sf/sf__data.c:3080:1: error: (near initialization for ‘gsl_sf_mathieu_Ms_e_data[0]’) testing/src/sf/sf__data.c:3080:1: error: initializer element is not constant testing/src/sf/sf__data.c:3080:1: error: (near initialization for ‘gsl_sf_mathieu_Ms_e_data[1]’) testing/src/sf/sfmodule_testing.c: In function ‘PyGSL_sf_ufunc_qi_dd_D’: testing/src/sf/sfmodule_testing.c:124:6: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable] testing/src/sf/sfmodule_testing.c: In function ‘PyGSL_sf_ufunc_qi_dd_D_as_ff_F’: testing/src/sf/sfmodule_testing.c:141:59: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable] testing/src/sf/sfmodule_testing.c: In function ‘PyGSL_sf_ufunc_qi_D_dd’: testing/src/sf/sfmodule_testing.c:162:6: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable] testing/src/sf/sfmodule_testing.c: In function ‘PyGSL_sf_ufunc_qi_D_dd_as_F_ff’: testing/src/sf/sfmodule_testing.c:184:76: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable] testing/src/sf/sfmodule_testing.c: In function ‘_pygsl_sf_long_to_unsigned_int’: testing/src/sf/sfmodule_testing.c:67:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘long unsigned int’ [-Wformat] testing/src/sf/sfmodule_testing.c:67:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘long unsigned int’ [-Wformat] testing/src/sf/sfmodule_testing.c:68:2: warning: too many arguments for format [-Wformat-extra-args] testing/src/sf/sfmodule_testing.c:79:3: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 7 has type ‘unsigned int’ [-Wformat] In file included from testing/src/sf/sfmodule_testing.c:104:0: testing/src/sf/sf__data.c: At top level: testing/src/sf/sf__data.c:3010:53: error: ‘gsl_sf_mathieu_a_e’ undeclared here (not in a function) testing/src/sf/sf__data.c:3024:53: error: ‘gsl_sf_mathieu_b_e’ undeclared here (not in a function) testing/src/sf/sf__data.c:3024:1: error: initializer element is not constant testing/src/sf/sf__data.c:3024:1: error: (near initialization for ‘gsl_sf_mathieu_b_e_data[0]’) testing/src/sf/sf__data.c:3024:1: error: initializer element is not constant testing/src/sf/sf__data.c:3024:1: error: (near initialization for ‘gsl_sf_mathieu_b_e_data[1]’) testing/src/sf/sf__data.c:3038:54: error: ‘gsl_sf_mathieu_ce_e’ undeclared here (not in a function) testing/src/sf/sf__data.c:3038:1: error: initializer element is not constant testing/src/sf/sf__data.c:3038:1: error: (near initialization for ‘gsl_sf_mathieu_ce_e_data[0]’) testing/src/sf/sf__data.c:3038:1: error: initializer element is not constant testing/src/sf/sf__data.c:3038:1: error: (near initialization for ‘gsl_sf_mathieu_ce_e_data[1]’) testing/src/sf/sf__data.c:3052:54: error: ‘gsl_sf_mathieu_se_e’ undeclared here (not in a function) testing/src/sf/sf__data.c:3052:1: error: initializer element is not constant testing/src/sf/sf__data.c:3052:1: error: (near initialization for ‘gsl_sf_mathieu_se_e_data[0]’) testing/src/sf/sf__data.c:3052:1: error: initializer element is not constant testing/src/sf/sf__data.c:3052:1: error: (near initialization for ‘gsl_sf_mathieu_se_e_data[1]’) testing/src/sf/sf__data.c:3066:54: error: ‘gsl_sf_mathieu_Mc_e’ undeclared here (not in a function) testing/src/sf/sf__data.c:3066:1: error: initializer element is not constant testing/src/sf/sf__data.c:3066:1: error: (near initialization for ‘gsl_sf_mathieu_Mc_e_data[0]’) testing/src/sf/sf__data.c:3066:1: error: initializer element is not constant testing/src/sf/sf__data.c:3066:1: error: (near initialization for ‘gsl_sf_mathieu_Mc_e_data[1]’) testing/src/sf/sf__data.c:3080:54: error: ‘gsl_sf_mathieu_Ms_e’ undeclared here (not in a function) testing/src/sf/sf__data.c:3080:1: error: initializer element is not constant testing/src/sf/sf__data.c:3080:1: error: (near initialization for ‘gsl_sf_mathieu_Ms_e_data[0]’) testing/src/sf/sf__data.c:3080:1: error: initializer element is not constant testing/src/sf/sf__data.c:3080:1: error: (near initialization for ‘gsl_sf_mathieu_Ms_e_data[1]’) testing/src/sf/sfmodule_testing.c: In function ‘PyGSL_sf_ufunc_qi_dd_D’: testing/src/sf/sfmodule_testing.c:124:6: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable] testing/src/sf/sfmodule_testing.c: In function ‘PyGSL_sf_ufunc_qi_dd_D_as_ff_F’: testing/src/sf/sfmodule_testing.c:141:59: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable] testing/src/sf/sfmodule_testing.c: In function ‘PyGSL_sf_ufunc_qi_D_dd’: testing/src/sf/sfmodule_testing.c:162:6: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable] testing/src/sf/sfmodule_testing.c: In function ‘PyGSL_sf_ufunc_qi_D_dd_as_F_ff’: testing/src/sf/sfmodule_testing.c:184:76: warning: variable ‘tmp’ set but not used [-Wunused-but-set-variable] error: Command "gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DSWIG_COBJECT_TYPES=1 -DDEBUG=1 -DPyGSL_SET_GSL_ERROR_HANDLER=1 -DNUMERIC=0 -UNDEBUG -I/usr/local/include -IInclude -I. -I/usr/local/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c testing/src/sf/sfmodule_testing.c -o build/temp.linux-x86_64-2.7/testing/src/sf/sfmodule_testing.o" failed with exit status 1
first install gcc using yum install gcc then install python module
I have solved the problem by install pygsl-2.1.1 based on the Python2.7 by piping install it. But the gsl version is 1.15, So you have to change the software sources to get the gsl-1.16. It works now.
error: command 'c:\\mingw\\bin\\gcc.exe' failed with exit status 1
I've been experiencing the "Unable to find vcvarsall.bat" error in Pycharm when installing third-party packages using Easy_install. Once installed the MinGW, checked that gcc compiler is marked, configured the distutils.cfg, and changed the PATH variable, I find the following problem: Install packages failed: Error occurred when installing package pysqlite. The following command was executed: packaging_tool.py install --build-dir C:\Users\Francisco\AppData\Local\Temp\pycharm- packaging5564903716757323670.tmp pysqlite The error output of the command: Downloading/unpacking pysqlite Running setup.py egg_info for package pysqlite Installing collected packages: pysqlite Running setup.py install for pysqlite building 'pysqlite2._sqlite' extension c:\mingw\bin\gcc.exe -mdll -O -Wall -DMODULE_NAME=\"pysqlite2.dbapi2\" - DSQLITE_OMIT_LOAD_EXTENSION=1 -IC:\Python27\include -IC:\Python27\PC -c src/module.c -o build\temp.win32-2.7\Release\src\module.o In file included from src/module.c:24: src/connection.h:33:21: error: sqlite3.h: No such file or directory In file included from src/module.c:24: src/connection.h:38: error: expected specifier-qualifier-list before 'sqlite3' In file included from src/module.c:25: src/statement.h:37: error: expected specifier-qualifier-list before 'sqlite3' src/module.c: In function 'module_complete': src/module.c:103: warning: implicit declaration of function 'sqlite3_complete' src/module.c: At top level: src/module.c:269: error: 'SQLITE_OK' undeclared here (not in a function) src/module.c:270: error: 'SQLITE_DENY' undeclared here (not in a function) src/module.c:271: error: 'SQLITE_IGNORE' undeclared here (not in a function) src/module.c:272: error: 'SQLITE_CREATE_INDEX' undeclared here (not in a function) src/module.c:273: error: 'SQLITE_CREATE_TABLE' undeclared here (not in a function) src/module.c:274: error: 'SQLITE_CREATE_TEMP_INDEX' undeclared here (not in a function) src/module.c:275: error: 'SQLITE_CREATE_TEMP_TABLE' undeclared here (not in a function) src/module.c:276: error: 'SQLITE_CREATE_TEMP_TRIGGER' undeclared here (not in a function) src/module.c:277: error: 'SQLITE_CREATE_TEMP_VIEW' undeclared here (not in a function) src/module.c:278: error: 'SQLITE_CREATE_TRIGGER' undeclared here (not in a function) src/module.c:279: error: 'SQLITE_CREATE_VIEW' undeclared here (not in a function) src/module.c:280: error: 'SQLITE_DELETE' undeclared here (not in a function) src/module.c:281: error: 'SQLITE_DROP_INDEX' undeclared here (not in a function) src/module.c:282: error: 'SQLITE_DROP_TABLE' undeclared here (not in a function) src/module.c:283: error: 'SQLITE_DROP_TEMP_INDEX' undeclared here (not in a function) src/module.c:284: error: 'SQLITE_DROP_TEMP_TABLE' undeclared here (not in a function) src/module.c:285: error: 'SQLITE_DROP_TEMP_TRIGGER' undeclared here (not in a function) src/module.c:286: error: 'SQLITE_DROP_TEMP_VIEW' undeclared here (not in a function) src/module.c:287: error: 'SQLITE_DROP_TRIGGER' undeclared here (not in a function) src/module.c:288: error: 'SQLITE_DROP_VIEW' undeclared here (not in a function) src/module.c:289: error: 'SQLITE_INSERT' undeclared here (not in a function) src/module.c:290: error: 'SQLITE_PRAGMA' undeclared here (not in a function) src/module.c:291: error: 'SQLITE_READ' undeclared here (not in a function) src/module.c:292: error: 'SQLITE_SELECT' undeclared here (not in a function) src/module.c:293: error: 'SQLITE_TRANSACTION' undeclared here (not in a function) src/module.c:294: error: 'SQLITE_UPDATE' undeclared here (not in a function) src/module.c:295: error: 'SQLITE_ATTACH' undeclared here (not in a function) src/module.c:296: error: 'SQLITE_DETACH' undeclared here (not in a function) src/module.c: In function 'init_sqlite': src/module.c:426: warning: implicit declaration of function 'sqlite3_libversion' src/module.c:426: warning: passing argument 1 of 'PyString_FromString' makes pointer from integer without a cast error: command 'c:\\mingw\\bin\\gcc.exe' failed with exit status 1 Complete output from command C:\Python27\python.exe -c "import setuptools;__file__='C:\\Users\\Francisco\\AppData\\Local\\Temp\\pycharm- packaging5564903716757323670.tmp\\pysqlite\\setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record c:\users\franci~1\appdata\local\temp\pip-obw3c6-record\install-record.txt --single-version-externally-managed: running install running build running build_py creating build creating build\lib.win32-2.7 creating build\lib.win32-2.7\pysqlite2 copying lib\dbapi2.py -> build\lib.win32-2.7\pysqlite2 copying lib\dump.py -> build\lib.win32-2.7\pysqlite2 copying lib\__init__.py -> build\lib.win32-2.7\pysqlite2 creating build\lib.win32-2.7\pysqlite2\test copying lib\test\dbapi.py -> build\lib.win32-2.7\pysqlite2\test copying lib\test\dump.py -> build\lib.win32-2.7\pysqlite2\test copying lib\test\factory.py -> build\lib.win32-2.7\pysqlite2\test copying lib\test\hooks.py -> build\lib.win32-2.7\pysqlite2\test copying lib\test\regression.py -> build\lib.win32-2.7\pysqlite2\test copying lib\test\transactions.py -> build\lib.win32-2.7\pysqlite2\test copying lib\test\types.py -> build\lib.win32-2.7\pysqlite2\test copying lib\test\userfunctions.py -> build\lib.win32-2.7\pysqlite2\test copying lib\test\__init__.py -> build\lib.win32-2.7\pysqlite2\test creating build\lib.win32-2.7\pysqlite2\test\py25 copying lib\test\py25\py25tests.py -> build\lib.win32-2.7\pysqlite2\test\py25 copying lib\test\py25\__init__.py -> build\lib.win32-2.7\pysqlite2\test\py25 running build_ext building 'pysqlite2._sqlite' extension creating build\temp.win32-2.7 creating build\temp.win32-2.7\Release creating build\temp.win32-2.7\Release\src c:\mingw\bin\gcc.exe -mdll -O -Wall -DMODULE_NAME=\"pysqlite2.dbapi2\" -DSQLITE_OMIT_LOAD_EXTENSION=1 -IC:\Python27\include -IC:\Python27\PC -c src/module.c -o build\temp.win32-2.7\Release\src\module.o In file included from src/module.c:24: src/connection.h:33:21: error: sqlite3.h: No such file or directory In file included from src/module.c:24: src/connection.h:38: error: expected specifier-qualifier-list before 'sqlite3' In file included from src/module.c:25: src/statement.h:37: error: expected specifier-qualifier-list before 'sqlite3' src/module.c: In function 'module_complete': src/module.c:103: warning: implicit declaration of function 'sqlite3_complete' src/module.c: At top level: src/module.c:269: error: 'SQLITE_OK' undeclared here (not in a function) src/module.c:270: error: 'SQLITE_DENY' undeclared here (not in a function) src/module.c:271: error: 'SQLITE_IGNORE' undeclared here (not in a function) src/module.c:272: error: 'SQLITE_CREATE_INDEX' undeclared here (not in a function) src/module.c:273: error: 'SQLITE_CREATE_TABLE' undeclared here (not in a function) src/module.c:274: error: 'SQLITE_CREATE_TEMP_INDEX' undeclared here (not in a function) src/module.c:275: error: 'SQLITE_CREATE_TEMP_TABLE' undeclared here (not in a function) src/module.c:276: error: 'SQLITE_CREATE_TEMP_TRIGGER' undeclared here (not in a function) src/module.c:277: error: 'SQLITE_CREATE_TEMP_VIEW' undeclared here (not in a function) src/module.c:278: error: 'SQLITE_CREATE_TRIGGER' undeclared here (not in a function) src/module.c:279: error: 'SQLITE_CREATE_VIEW' undeclared here (not in a function) src/module.c:280: error: 'SQLITE_DELETE' undeclared here (not in a function) src/module.c:281: error: 'SQLITE_DROP_INDEX' undeclared here (not in a function) src/module.c:282: error: 'SQLITE_DROP_TABLE' undeclared here (not in a function) src/module.c:283: error: 'SQLITE_DROP_TEMP_INDEX' undeclared here (not in a function) src/module.c:284: error: 'SQLITE_DROP_TEMP_TABLE' undeclared here (not in a function) src/module.c:285: error: 'SQLITE_DROP_TEMP_TRIGGER' undeclared here (not in a function) src/module.c:286: error: 'SQLITE_DROP_TEMP_VIEW' undeclared here (not in a function) src/module.c:287: error: 'SQLITE_DROP_TRIGGER' undeclared here (not in a function) src/module.c:288: error: 'SQLITE_DROP_VIEW' undeclared here (not in a function) src/module.c:289: error: 'SQLITE_INSERT' undeclared here (not in a function) src/module.c:290: error: 'SQLITE_PRAGMA' undeclared here (not in a function) src/module.c:291: error: 'SQLITE_READ' undeclared here (not in a function) src/module.c:292: error: 'SQLITE_SELECT' undeclared here (not in a function) src/module.c:293: error: 'SQLITE_TRANSACTION' undeclared here (not in a function) src/module.c:294: error: 'SQLITE_UPDATE' undeclared here (not in a function) src/module.c:295: error: 'SQLITE_ATTACH' undeclared here (not in a function) src/module.c:296: error: 'SQLITE_DETACH' undeclared here (not in a function) src/module.c: In function 'init_sqlite': src/module.c:426: warning: implicit declaration of function 'sqlite3_libversion' src/module.c:426: warning: passing argument 1 of 'PyString_FromString' makes pointer from integer without a cast error: command 'c:\\mingw\\bin\\gcc.exe' failed with exit status 1 I'm working over Windows 8. Maybe the problem is in the *.h files from python. Any idea?
The key error is this one src/connection.h:33:21: error: sqlite3.h: No such file or directory You don't have the sqlite3 header files so it can compile the extension. The MinGW compiler seems to be working ok. You need to download the source code, build it and make it available to easy_install, and the same with the rest of the dependencies. However, I wonder why you need to install pysqlite when you already have the sqlite3 module included as part of the standard windows Python distribution. Just enter the interpreter and issue an import sqlite3 command.
error installing mod_wsgi on SUSE 11 server
apache version :2.2.6 python versoin :2.6 result of ./configure --with-apxs=/usr/local/apache2/bin/apxs --with-python=/usr/bin/python is ok but just got some errors as follows when make: .... mod_wsgi.c:14430: error: expected expression before âmoduleâ mod_wsgi.c:14431: error: expected identifier or â(â before â=â token mod_wsgi.c:14446: error: expected expression before âmoduleâ mod_wsgi.c:14447: error: âmodule_dictâ undeclared (first use in this function) mod_wsgi.c:14448: error: âobjectâ undeclared (first use in this function) mod_wsgi.c:14450: error: expected expression before âmoduleâ mod_wsgi.c:14454: error: âvarsâ undeclared (first use in this function) mod_wsgi.c:14455: error: âargsâ undeclared (first use in this function) mod_wsgi.c:14456: error: âresultâ undeclared (first use in this function) mod_wsgi.c:14457: error: âmethodâ undeclared (first use in this function) mod_wsgi.c:14474: error: âPy_Noneâ undeclared (first use in this function) mod_wsgi.c:14488: error: âPy_Trueâ undeclared (first use in this function) mod_wsgi.c:14491: error: âPy_Falseâ undeclared (first use in this function) mod_wsgi.c:14503: error: âPyExc_TypeErrorâ undeclared (first use in this function) mod_wsgi.c:14519: error: âAuthObjectâ has no member named ârâ mod_wsgi.c:14523: error: âAuthObjectâ has no member named âlogâ mod_wsgi.c:14526: error: âPyExc_AttributeErrorâ undeclared (first use in this function) mod_wsgi.c:14528: error: âAuthObjectâ has no member named âlogâ mod_wsgi.c:14541: error: expected expression before â)â token mod_wsgi.c:14548: error: expected â;â before âap_log_rerrorâ mod_wsgi.c:14553: error: expected â;â before â}â token mod_wsgi.c:14558: error: too many arguments to function âwsgi_log_python_errorâ mod_wsgi.c:14563: error: expected expression before âmoduleâ apxs:Error: Command failed with rc=65536 . make: *** [mod_wsgi.la] Error 1 Please advise me
i had the same error; i solved it by compileing python 2.7.2 from scratch; if you look around different forums you will see that some libraries of python where compiled on a 32 bit system and you problably are using a 64 bit system. go for 2.7 or above 2.6 is a pain to compile due to all the missing dependencies that you have to get. you will end with something like this Python build finished, but the necessary bits to build these modules were not found: bsddb185 dl imageop sunaudiodev To find the necessary bits, look in setup.py in detect_modules() for the module's name. Failed to build these modules: _curses_panel running build_scripts this libraries have all been depreciated so it is safe to do a make install as is
Problem compiling Python 2.6.4 on AIX 5.3
I'm trying to build Python 2.6.4 on AIX 5.3. I'm running configure like this: ./configure --prefix=/home/chenf/python --disable-ipv6 --disable-shared --with-libs='/usr/lib/libncurses.a' --without-threads --disable-threads --with-ncurses=/utv/sad/ncurses/lib/libncurses.a I seem to be having linking problems with ncurses (see below), which is why I've tried in multiple ways to point out to configure where to find libncurses.a. /usr/lib/libncurses.a is a symbolic link to /utv/sad/ncurses/lib/libncurses.a, which exists and has no permission problems. There is also a link to that file in /usr/local/lib. My problem is that I get the following errors from make: running build running build_ext INFO: Can't locate Tcl/Tk libs and/or headers building '_curses' extension ./Modules/ld_so_aix gcc -bI:Modules/python.exp build/temp.aix-5.3-2.6/home/chenf/python-src/Python-2.6.4/Modules/_cursesmodule.o -L/usr/local/lib -lncurses -o build/lib.aix-5.3-2.6/_curses.so ld: 0711-317 ERROR: Undefined symbol: _unctrl ld: 0711-317 ERROR: Undefined symbol: .setsyx ld: 0711-317 ERROR: Undefined symbol: ._setqiflush ld: 0711-317 ERROR: Undefined symbol: .initscr32 ld: 0711-317 ERROR: Undefined symbol: wacs_map ld: 0711-317 ERROR: Undefined symbol: ._getsyx ld: 0711-317 ERROR: Undefined symbol: .getattrs ld: 0711-317 ERROR: Undefined symbol: .w32attrset ld: 0711-317 ERROR: Undefined symbol: .w32insch ld: 0711-317 ERROR: Undefined symbol: .p32echochar ld: 0711-317 ERROR: Undefined symbol: .w32echochar ld: 0711-317 ERROR: Undefined symbol: .getcury ld: 0711-317 ERROR: Undefined symbol: .getcurx ld: 0711-317 ERROR: Undefined symbol: .box32 ld: 0711-317 ERROR: Undefined symbol: .w32attron ld: 0711-317 ERROR: Undefined symbol: .w32attroff ld: 0711-317 ERROR: Undefined symbol: .w32addch ld: 0711-317 ERROR: Undefined symbol: .getpary ld: 0711-317 ERROR: Undefined symbol: .getparx ld: 0711-317 ERROR: Undefined symbol: .getmaxy ld: 0711-317 ERROR: Undefined symbol: .getmaxx ld: 0711-317 ERROR: Undefined symbol: .getbegy ld: 0711-317 ERROR: Undefined symbol: .getbegx ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. collect2: ld returned 8 exit status building 'zlib' extension ./Modules/ld_so_aix gcc -bI:Modules/python.exp build/temp.aix-5.3-2.6/home/chenf/python-src/Python-2.6.4/Modules/zlibmodule.o -L/usr/local/lib -lz -o build/lib.aix-5.3-2.6/zlib.so ld: 0711-317 ERROR: Undefined symbol: .inflateCopy ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. collect2: ld returned 8 exit status building 'bz2' extension gcc -DNDEBUG -O -I. -I/home/chenf/python-src/Python-2.6.4/./Include -I. -IInclude -I./Include -I/usr/local/include -I/home/chenf/python-src/Python-2.6.4/Include -I/home/chenf/python-src/Python-2.6.4 -c /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c -o build/temp.aix-5.3-2.6/home/chenf/python-src/Python-2.6.4/Modules/bz2module.o /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:12:19: bzlib.h: No such file or directory /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:111: error: parse error before "BZFILE" /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:111: warning: no semicolon at end of struct or union /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:118: error: parse error before '}' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:118: warning: data definition has no type or storage class /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:122: error: parse error before "bz_stream" /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:122: warning: no semicolon at end of struct or union /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:127: error: parse error before '}' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:127: warning: data definition has no type or storage class /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:131: error: parse error before "bz_stream" /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:131: warning: no semicolon at end of struct or union /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:137: error: parse error before '}' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:137: warning: data definition has no type or storage class /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `Util_CatchBZ2Error': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:147: error: `BZ_OK' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:147: error: (Each undeclared identifier is reported only once /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:147: error: for each function it appears in.) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:148: error: `BZ_STREAM_END' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:160: error: `BZ_PARAM_ERROR' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:167: error: `BZ_MEM_ERROR' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:172: error: `BZ_DATA_ERROR' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:173: error: `BZ_DATA_ERROR_MAGIC' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:178: error: `BZ_IO_ERROR' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:183: error: `BZ_UNEXPECTED_EOF' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:190: error: `BZ_SEQUENCE_ERROR' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: At top level: /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:229: error: parse error before '*' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `Util_GetLine': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:239: error: `f' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:243: error: `n' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:265: error: `BZ_OK' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:282: error: `BZ_STREAM_END' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: At top level: /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:325: error: parse error before "BZFILE" /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `Util_UnivNewlineRead': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:328: error: `buf' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:334: error: `f' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:335: error: `bzerror' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:335: error: `stream' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:335: error: `n' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:380: error: `BZ_STREAM_END' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: At top level: /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:392: error: parse error before '*' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `Util_DropReadAhead': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:394: error: `f' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: At top level: /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:402: error: parse error before '*' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `Util_ReadAhead': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:407: error: `f' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:418: error: `bufsize' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:427: error: `BZ_STREAM_END' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:430: error: `BZ_OK' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: At top level: /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:443: error: parse error before '*' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `Util_ReadAheadGetLineSkip': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:450: error: `f' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:451: error: `bufsize' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:457: error: `skip' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: At top level: /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:498: error: parse error before '*' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `BZ2File_read': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:505: error: `args' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:509: error: `self' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:549: error: `BZ_STREAM_END' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:553: error: `BZ_OK' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: At top level: /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:585: error: parse error before '*' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `BZ2File_readline': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:590: error: `args' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:594: error: `self' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: At top level: /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:630: error: parse error before '*' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `BZ2File_readlines': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:647: error: `args' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:651: error: `self' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:677: error: `BZ_STREAM_END' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:685: error: `BZ_OK' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: At top level: /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:792: error: parse error before '*' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `BZ2File_write': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:800: error: `args' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:806: error: `self' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:828: error: `BZ_OK' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: At top level: /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:852: error: parse error before '*' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `BZ2File_writelines': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:863: error: `self' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:878: error: `seq' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:953: error: `BZ_OK' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: At top level: /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:990: error: parse error before '*' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `BZ2File_seek': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1004: error: `args' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1016: error: `self' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1046: error: `BZ_STREAM_END' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1048: error: `BZ_OK' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: At top level: /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1143: error: parse error before '*' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `BZ2File_tell': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1147: error: `self' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: At top level: /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1172: error: parse error before '*' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `BZ2File_close': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1175: error: `BZ_OK' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1178: error: `self' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: At top level: /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1204: error: parse error before '*' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1225: error: parse error before '*' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `BZ2File_get_newlines': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1227: error: `self' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: At top level: /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1254: error: parse error before '*' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `BZ2File_get_closed': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1256: error: `self' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: At top level: /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1260: error: parse error before '*' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `BZ2File_get_mode': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1262: error: `self' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: At top level: /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1266: error: parse error before '*' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `BZ2File_get_name': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1268: error: `self' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: At top level: /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1291: error: parse error before ')' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1291: error: initializer element is not constant /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1291: error: (near initialization for `BZ2File_members[0].offset') /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1292: error: initializer element is not constant /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1292: error: (near initialization for `BZ2File_members[0]') /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1293: error: initializer element is not constant /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1293: error: (near initialization for `BZ2File_members[1]') /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1300: error: parse error before '*' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `BZ2File_init': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1311: error: `self' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1313: error: `args' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1313: error: `kwargs' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1390: error: `BZ_OK' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: At top level: /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1412: error: parse error before '*' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `BZ2File_dealloc': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1419: error: `self' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: At top level: /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1440: error: parse error before '*' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `BZ2File_getiter': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1442: error: `self' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: At top level: /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1454: error: parse error before '*' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `BZ2File_iternext': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1458: error: `self' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: At top level: /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1554: error: parse error before '*' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `BZ2Comp_compress': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1562: error: `bz_stream' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1562: error: `bzs' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1562: error: `self' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1565: error: `args' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1595: error: `BZ_RUN' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1597: error: `BZ_RUN_OK' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: At top level: /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1636: error: parse error before '*' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `BZ2Comp_flush': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1640: error: `bz_stream' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1640: error: `bzs' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1640: error: `self' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1663: error: `BZ_FINISH' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1665: error: `BZ_STREAM_END' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1667: error: `BZ_FINISH_OK' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: At top level: /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1707: error: parse error before '*' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `BZ2Comp_init': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1713: error: `args' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1713: error: `kwargs' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1731: error: `self' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1731: error: `bz_stream' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1733: error: `BZ_OK' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: At top level: /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1752: error: parse error before '*' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `BZ2Comp_dealloc': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1758: error: `self' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: At top level: /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1826: error: parse error before ')' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1826: error: initializer element is not constant /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1826: error: (near initialization for `BZ2Decomp_members[0].offset') /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1826: error: initializer element is not constant /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1826: error: (near initialization for `BZ2Decomp_members[0]') /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1827: error: initializer element is not constant /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1827: error: (near initialization for `BZ2Decomp_members[1]') /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1845: error: parse error before '*' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `BZ2Decomp_decompress': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1853: error: `bz_stream' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1853: error: `bzs' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1853: error: `self' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1856: error: `args' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1883: error: `BZ_STREAM_END' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1893: error: `BZ_OK' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: At top level: /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1936: error: parse error before '*' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `BZ2Decomp_init': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1940: error: `args' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1951: error: `self' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1955: error: `bz_stream' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1957: error: `BZ_OK' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: At top level: /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1978: error: parse error before '*' token /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `BZ2Decomp_dealloc': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:1984: error: `self' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `bz2_compress': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:2065: error: `bz_stream' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:2065: error: parse error before "_bzs" /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:2066: error: `bzs' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:2066: error: `_bzs' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:2102: error: `BZ_OK' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:2111: error: `BZ_FINISH' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:2113: error: `BZ_STREAM_END' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:2115: error: `BZ_FINISH_OK' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c: In function `bz2_decompress': /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:2158: error: `bz_stream' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:2158: error: parse error before "_bzs" /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:2159: error: `bzs' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:2159: error: `_bzs' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:2186: error: `BZ_OK' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/bz2module.c:2197: error: `BZ_STREAM_END' undeclared (first use in this function) building '_multiprocessing' extension gcc -DNDEBUG -O -DHAVE_SEM_OPEN=1 -DHAVE_FD_TRANSFER=1 -DHAVE_SEM_TIMEDWAIT=1 -IModules/_multiprocessing -I. -I/home/chenf/python-src/Python-2.6.4/./Include -I. -IInclude -I./Include -I/usr/local/include -I/home/chenf/python-src/Python-2.6.4/Include -I/home/chenf/python-src/Python-2.6.4 -c /home/chenf/python-src/Python-2.6.4/Modules/_multiprocessing/socket_connection.c -o build/temp.aix-5.3-2.6/home/chenf/python-src/Python-2.6.4/Modules/_multiprocessing/socket_connection.o In file included from /home/chenf/python-src/Python-2.6.4/Modules/_multiprocessing/socket_connection.c:202: /home/chenf/python-src/Python-2.6.4/Modules/_multiprocessing/connection.h: In function `connection_poll': /home/chenf/python-src/Python-2.6.4/Modules/_multiprocessing/connection.h:357: error: `_save' undeclared (first use in this function) /home/chenf/python-src/Python-2.6.4/Modules/_multiprocessing/connection.h:357: error: (Each undeclared identifier is reported only once /home/chenf/python-src/Python-2.6.4/Modules/_multiprocessing/connection.h:357: error: for each function it appears in.) Traceback (most recent call last): File "./setup.py", line 1910, in main() File "./setup.py", line 1905, in main 'Lib/smtpd.py'] File "/home/chenf/python-src/Python-2.6.4/Lib/distutils/core.py", line 152, in setup dist.run_commands() File "/home/chenf/python-src/Python-2.6.4/Lib/distutils/dist.py", line 975, in run_commands self.run_command(cmd) File "/home/chenf/python-src/Python-2.6.4/Lib/distutils/dist.py", line 995, in run_command cmd_obj.run() File "/home/chenf/python-src/Python-2.6.4/Lib/distutils/command/build.py", line 134, in run self.run_command(cmd_name) File "/home/chenf/python-src/Python-2.6.4/Lib/distutils/cmd.py", line 333, in run_command self.distribution.run_command(command) File "/home/chenf/python-src/Python-2.6.4/Lib/distutils/dist.py", line 995, in run_command cmd_obj.run() File "/home/chenf/python-src/Python-2.6.4/Lib/distutils/command/build_ext.py", line 340, in run self.build_extensions() File "./setup.py", line 201, in build_extensions build_ext.build_extensions(self) File "/home/chenf/python-src/Python-2.6.4/Lib/distutils/command/build_ext.py", line 449, in build_extensions self.build_extension(ext) File "./setup.py", line 234, in build_extension if not self.configure_ctypes(ext): File "./setup.py", line 1715, in configure_ctypes ffi_srcdir = os.path.join(fficonfig['ffi_srcdir'], 'src') KeyError: 'ffi_srcdir' make: 1254-004 The error code from the last command is 1. Stop. The thing about not being able to locate Tcl/Tk is not a problem, I don't need those. However, curses, which is the following problem, IS a problem. I need that. If I interpret things correctly, it can't find libncurses.a. At least, all the listed "Undefined symbols" look like ncurses functions to me. But maybe I'm wrong, maybe it does find the libncurses.a file, but can't find the symbols in it? I don't know.
It looks like bzip2 isn't able to find itself, either -- sometimes you see weird Python build errors when you wander too far from GCC. My first gut recommendation would be to compile with GCC, GNU binutils, and GNU make, and see if the problem persists. Also, when you're talking to configure, it'll figure out the name of the library from your configure option. Therefore, this: --with-ncurses=/utv/sad/ncurses/lib/libncurses.a Should be: --with-ncurses=/utv/sad/ncurses/lib But that also implies that the headers can be found there. Can they? There may also be an option to your platform's compiler to add a directory for libs -- since, in this case, Python is trying to use -lncurses before it compiles the extension (making the linker search for libncurses.a in the library search path).
This is so old problem(2009 ??)..but I meet the same problem today!! For other AIX users like me...I will leave my case OK..first, Check your environmental variable OBJECT_MODE. In my case, OBJECT_MODE was 64, but the archive file libcurses.a contains only 32bit object files!! After changing the environmental variable OBJECT_MODE to 32, everything worked!!!
Thanks to Jed Smith's suggestions, I've managed to get this to work. This is what I did accomplish this: Step one: First, I edited "Makefile.pre.in". I replaced the line "CC= #CC#" with "CC= gcc". As far as I can tell, this forced the compilation to use gcc instead of whatever other unnamable hideousness AIX tried to use. Step two: Put a soft link for ncurses.h under /usr/include. I couldn't get configure to find ncurses.h under /opt/utv/sad/include/ncurses/, so I cheated; I ran the following command as root: ln -s /utv/sad/ncurses/include/ncurses/ncurses.h /usr/include/ncurses.h Step three: I compiled and installed GNU binutils and GNU make, configuring them with "--prefix=/home/chenf". Then I put /home/chenf/bin first in my path, to make sure the compilation process would use whatever it found there instead of the defaults provides by AIX. Step four: I ran configure like this: ./configure --prefix=/opt/freeware --disable-ipv6 --without-threads --with-ncurses=/opt/sad/ncurses Ipv6 and threads were giving me compilation errors, and I don't need them, so that's why I disabled them. Under the /opt/sad/ncurses directory, lib/libncurses.a is found. That seems to have taken care of the library itself. After that, all I had to do was "make" and "make install". Done. I did get some errors during compilation, and in the end I was told that it had failed to produce some of the modules (like math, and datetime) but that everything else was still OK. For the time being I'll make do without them.
Why pysqlite does not work properly?
I tried to install pysqlite. Some suspicious things start to appear during the installation. Why I typed: python setup.py build I got the following message in the end: src/module.c:286: error: ‘SQLITE_PRAGMA’ undeclared here (not in a function) src/module.c:287: error: ‘SQLITE_READ’ undeclared here (not in a function) src/module.c:288: error: ‘SQLITE_SELECT’ undeclared here (not in a function) src/module.c:289: error: ‘SQLITE_TRANSACTION’ undeclared here (not in a function) src/module.c:290: error: ‘SQLITE_UPDATE’ undeclared here (not in a function) src/module.c:291: error: ‘SQLITE_ATTACH’ undeclared here (not in a function) src/module.c:292: error: ‘SQLITE_DETACH’ undeclared here (not in a function) src/module.c: In function ‘init_sqlite’: src/module.c:419: warning: implicit declaration of function ‘sqlite3_libversion’ src/module.c:419: warning: passing argument 1 of ‘PyString_FromString’ makes pointer from integer without a cast error: command 'gcc' failed with exit status 1 I just ignored the last line and decided to continue. So, I typed: python setup.py install And than, again, I got similar error message: src/module.c:288: error: ‘SQLITE_SELECT’ undeclared here (not in a function) src/module.c:289: error: ‘SQLITE_TRANSACTION’ undeclared here (not in a function) src/module.c:290: error: ‘SQLITE_UPDATE’ undeclared here (not in a function) src/module.c:291: error: ‘SQLITE_ATTACH’ undeclared here (not in a function) src/module.c:292: error: ‘SQLITE_DETACH’ undeclared here (not in a function) src/module.c: In function ‘init_sqlite’: src/module.c:419: warning: implicit declaration of function ‘sqlite3_libversion’ src/module.c:419: warning: passing argument 1 of ‘PyString_FromString’ makes pointer from integer without a cast error: command 'gcc' failed with exit status 1 After that I wanted to try if pysqlite works. If in the python-command-line mode I type from pysqlite2 import * Python does not complain. However, if I try to follow an exmaple in my book: from pysqlite2 import dbapi2 as sqlite I get a error message: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "pysqlite2/dbapi2.py", line 27, in <module> from pysqlite2._sqlite import * ImportError: No module named _sqlite Does anybody have any ideas why it happens and how this problem can be solved. By the way, I have installed a new version of Python. "python -V" gives me "Python 2.6.2". Thank you in advance for any help.
I just ignored the last line and decided to continue. You can't just ignore the last line. It was telling you there was an error, so it couldn't compile. The next thing you ran told you it couldn't install because it couldn't compile. Then, your python told you it couldn't run the code because it wasn't installed. You need to get the compile step working before you move on to installing it.
A lesson in compiling python extensions is needed, which distribution are you using ? You seem to be missing the sqlite headers with the given macro definitions. When the python setup runs it compiles bindings to the sqlite native binary and copies a few .py files to the library. The _sqlite is typically a .pyd file (equivalent to a dll) which has calls to the sqlite library, in your case that did not get built. Check the presence of the sqlite headers etc.
The correct way to build pysqlite is now on the website. $ tar xvfz <version>.tar.gz $ cd <version> $ python setup.py build_static install The build_static will download the latest sqlite code and statically compile against it. For a note I just did this on a 1and1 shared host. http://trac.edgewall.org/wiki/PySqlite#Buildingpysqlite