2011-01-12 14 views
6

pycurlはのpython2.6に罰金インストールされますが、私は異端問題python2.7.0にPyCurlをインストール+

$ sudo easy_install pycurl 
install_dir /usr/local/lib/python2.7/dist-packages/ 
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-PFzxzf/pycurl-7.19.0/egg-dist-tmp-oAFjdV 
Using curl-config (libcurl 7.21.0) 
src/pycurl.c:42: fatal error: Python.h: No such file or directory 
compilation terminated. 
error: Setup script exited with error: command 'gcc' failed with exit status 1 

にeasy_installを介して、2.7にでインストールしようとすると、私は次のエラーを取得するpycurlとの互換性はありません2.7か。

答えて

8
sudo apt-get install python-dev 

これは、必要なPython開発パッケージをインストールし、欠落しているヘッダーファイルの問題を修正します。

(コーリーによってコメントをお読みください)2.7がデフォルトのPythonのではない場合、あなたがしたいということ

+1

ノート代わりに「須藤はapt-getはpython2.7-devのインストール」。 –

+0

ポイント、私はそれを更新します。 – user225312