मैं easy_install के साथ एक virtualenv में pycurl स्थापित करने का प्रयास किया गया है नहीं मिला है, और इसे सही ढंग से स्थापित करने के लिए प्रकट होता है:PyCurl स्थापित लेकिन
(xxx) $ 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
Running pycurl-7.19.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-B2W9dY/pycurl-7.19.0/egg-dist-tmp-RmIsVr
Using curl-config (libcurl 7.19.7)
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: In function ‘do_multi_info_read’:
src/pycurl.c:2843: warning: call to ‘_curl_easy_getinfo_err_string’ declared with attribute warning: curl_easy_getinfo expects a pointer to char * for this info
src/pycurl.c: In function ‘multi_socket_callback’:
src/pycurl.c:2355: warning: call to ‘_curl_easy_getinfo_err_string’ declared with attribute warning: curl_easy_getinfo expects a pointer to char * for this info
In function ‘util_curl_unsetopt’,
inlined from ‘do_curl_unsetopt’ at src/pycurl.c:1551:
src/pycurl.c:1476: warning: call to ‘_curl_easy_setopt_err_CURLSH’ declared with attribute warning: curl_easy_setopt expects a CURLSH* argument for this option
gcc (GCC) 4.4.4 20100726 (Red Hat 4.4.4-13)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
zip_safe flag not set; analyzing archive contents...
Adding pycurl 7.19.0 to easy-install.pth file
Installed /home/ec2-user/.virtualenvs/xxx/lib/python2.7/site-packages/pycurl-7.19.0-py2.7-linux-x86_64.egg
Processing dependencies for pycurl
Finished processing dependencies for pycurl
हालांकि, जब उपयोग करने के लिए कोशिश कर रहा है, मैं निम्नलिखित त्रुटि मिलती है:
(xxx) $ python
Python 2.7.1 (r271:86832, Sep 12 2011, 13:51:42)
[GCC 4.4.4 20100726 (Red Hat 4.4.4-13)] on linux2
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
तथ्य यह है कि मैं स्पष्ट रूप से मेरे
~/.virtualenvs/xxx/lib/python2.7/site-packages
निर्देशिका में
pycurl-7.19.0-py2.7-linux-x86_64.egg
देख सकते हैं के बावजूद
।
इस समस्या को हल करने के तरीके पर कोई सुझाव बहुत सराहना की जाएगी!
वितरण अमेज़ॅन लिनक्स (ईसी 2, 64 बिट) है, पायथन 2.7 है, स्रोत से स्थापित है। कर्ल, libcurl और libcurl-dev सभी अमेज़ॅन यम repos द्वारा आपूर्ति कर रहे हैं और संस्करण 7.19.7-26.20 पर हैं।
मैं अमेज़ॅन रिपोज द्वारा प्रदान किए गए pycurl पैकेज को स्थापित नहीं कर सकता क्योंकि पाइथन का डिस्ट्रो-आपूर्ति संस्करण 2.6 है, और मेरी परियोजना 2.7 पर चलती है।
>>> import sys; sys.path
['', '/home/ec2-user/.virtualenvs/xxx/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg', '/home/ec2-user/.virtualenvs/xxx/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg', '/home/ec2-user/.virtualenvs/xxx/lib/python2.7/site-packages/pygeoip-0.2.1-py2.7.egg', '/home/ec2-user/.virtualenvs/xxx/lib/python2.7/site-packages/daryl_lib-1.8.4-py2.7.egg', '/home/ec2-user/.virtualenvs/xxx/lib/python2.7/site-packages/xxx-1.8.4-py2.7.egg', '/home/ec2-user/dealutils-1.5.0-py2.7.egg', '/home/ec2-user/.virtualenvs/xxx/lib/python2.7/site-packages/six-1.0.0-py2.7.egg', '/home/ec2-user/fm2c-1.3.0-py2.7.egg', '/home/ec2-user/.virtualenvs/xxx/lib/python2.7/site-packages/affiliatewindow-1.3.0-py2.7.egg', '/home/ec2-user/.virtualenvs/xxx/lib/python2.7/site-packages/icodes-1.3.0-py2.7.egg', '/home/ec2-user/.virtualenvs/xxx/lib/python2.7/site-packages/supervisor-3.0a10-py2.7.egg', '/home/ec2-user/.virtualenvs/xxx/lib/python2.7/site-packages/meld3-0.6.7-py2.7.egg', '/home/ec2-user/.virtualenvs/xxx/lib/python2.7/site-packages/tornado-1.2-py2.7.egg', '/home/ec2-user/.virtualenvs/xxx/lib/python2.7/site-packages/pycurl-7.19.0-py2.7-linux-x86_64.egg', '/home/ec2-user/.virtualenvs/xxx/lib/python2.7/site-packages', '/root', '/home/ec2-user/.virtualenvs/xxx/lib/python27.zip', '/home/ec2-user/.virtualenvs/xxx/lib/python2.7', '/home/ec2-user/.virtualenvs/xxx/lib/python2.7/plat-linux2', '/home/ec2-user/.virtualenvs/xxx/lib/python2.7/lib-tk', '/home/ec2-user/.virtualenvs/xxx/lib/python2.7/lib-old', '/home/ec2-user/.virtualenvs/xxx/lib/python2.7/lib-dynload', '/opt/python2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg', '/opt/python2.7/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg', '/opt/python2.7/lib/python2.7', '/opt/python2.7/lib/python2.7/plat-linux2', '/opt/python2.7/lib/python2.7/lib-tk', '/opt/python2.7/lib/python2.7/site-packages']
sys.path से आप क्या प्राप्त करते हैं? –
टॉमसो: जोड़ा sys।मुख्य प्रश्न के लिए पथ आउटपुट क्योंकि टिप्पणी बॉक्स बहुत छोटा है। यह एक पथ मुद्दा नहीं है। कोई अन्य सुझाव? – majackson