|
From: | Yungwei Chen |
Subject: | RE: [Fab-user] pkg_resources.DistributionNotFound: pycrypto>=1.9 |
Date: | Thu, 23 Sep 2010 17:55:46 -0400 |
I removed fabric, python-crypto, and paramiko, and then
installed fabric using pip, which gives me a bunch of error messages. I see two issues here: 1. python2.4 is used instead of python 2.5. 2. Python.h wasn't found. But it is in /usr/include/python2.5/Python.h. How can I fix them? Thanks. address@hidden fabric]# pip install fabric Downloading/unpacking fabric Downloading Fabric-0.9.2.tar.gz (90Kb): 90Kb downloaded Running setup.py egg_info for package fabric warning: no previously-included files matching '*' found
under directory 'docs/_build' Downloading/unpacking pycrypto<2.1 (from fabric) Running setup.py egg_info for package pycrypto Downloading/unpacking paramiko>=1.7.6 (from fabric) Downloading paramiko-1.7.6.zip (1.1Mb): 1.1Mb downloaded Running setup.py egg_info for package paramiko Installing collected packages: fabric, paramiko, pycrypto Running setup.py install for fabric File
"/usr/lib/python2.4/site-packages/fabric/network.py", line 79 return ('', '') if omit_port else ('', '', '') ^ SyntaxError: invalid syntax File
"/usr/lib/python2.4/site-packages/fabric/operations.py", line 269 with closing(ftp) as ftp: ^ SyntaxError: invalid syntax File
"/usr/lib/python2.4/site-packages/fabric/context_managers.py", line
25 yield ^ SyntaxError: invalid syntax File
"/usr/lib/python2.4/site-packages/fabric/contrib/files.py", line 29 with settings(warn_only=True): ^ SyntaxError: invalid syntax File
"/usr/lib/python2.4/site-packages/fabric/contrib/project.py", line 79 port_string = ("-p %s" % env.port) if
(env.port != '22') else "" ^ SyntaxError: invalid syntax File
"/usr/lib/python2.4/site-packages/fabric/main.py", line 220 trailer = "\n" if not
docstring.endswith("\n") else "" ^ SyntaxError: invalid syntax warning: no previously-included files matching '*' found
under directory 'docs/_build' Installing fab script to /usr/bin Running setup.py install for paramiko Running setup.py install for pycrypto building 'Crypto.Hash.MD2' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe
-Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic
-fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fPIC -Isrc/
-I/usr/include/python2.4 -c src/MD2.c -o build/temp.linux-i686-2.4/src/MD2.o src/MD2.c:15:20: error: Python.h: No such file or directory src/MD2.c:102: error: expected â=â, â,â, â;â, âasmâ or
â__attribute__â before â*â token In file included from src/MD2.c:118: src/hash_template.c:29: error: expected
specifier-qualifier-list before âPyObject_HEADâ src/hash_template.c:33: error: expected â=â, â,â, â;â, âasmâ
or â__attribute__â before âPyTypeObjectâ src/hash_template.c: In function ânewALGobjectâ: src/hash_template.c:42: warning: implicit declaration of
function âPyObject_Newâ src/hash_template.c:42: error: expected _expression_ before
âALGobjectâ src/hash_template.c:42: warning: assignment makes pointer
from integer without a cast src/hash_template.c: At top level: src/hash_template.c:49: error: expected â)â before â*â token src/hash_template.c:64: error: expected â=â, â,â, â;â, âasmâ
or â__attribute__â before â*â token src/hash_template.c:83: error: expected â=â, â,â, â;â, âasmâ
or â__attribute__â before â*â token src/hash_template.c:95: error: expected â=â, â,â, â;â, âasmâ
or â__attribute__â before â*â token src/hash_template.c:130: error: expected â=â, â,â, â;â,
âasmâ or â__attribute__â before â*â token src/hash_template.c:145: error: expected â=â, â,â, â;â,
âasmâ or â__attribute__â before âALG_methodsâ src/hash_template.c:154: error: expected â=â, â,â, â;â,
âasmâ or â__attribute__â before â*â token src/hash_template.c:163: error: expected â=â, â,â, â;â,
âasmâ or â__attribute__â before âALGtypeâ src/hash_template.c:188: error: expected â=â, â,â, â;â,
âasmâ or â__attribute__â before â*â token src/hash_template.c:219: error: array type has incomplete
element type src/hash_template.c:220: error: âPyCFunctionâ undeclared
here (not in a function) src/hash_template.c:220: error: expected â}â before
âALG_newâ src/hash_template.c: In function âinitMD2â: src/hash_template.c:236: error: âPyObjectâ undeclared (first
use in this function) src/hash_template.c:236: error: (Each undeclared identifier
is reported only once src/hash_template.c:236: error: for each function it appears
in.) src/hash_template.c:236: error: âmâ undeclared (first use in
this function) src/hash_template.c:238: error: âALGtypeâ undeclared (first
use in this function) src/hash_template.c:238: error: âPyType_Typeâ undeclared
(first use in this function) src/hash_template.c:239: warning: implicit declaration of
function âPy_InitModuleâ src/hash_template.c:242: error: âoâ undeclared (first use in
this function) src/hash_template.c:242: warning: implicit declaration of
function âPyInt_FromLongâ src/hash_template.c:242: warning: implicit declaration of
function âPyDict_SetItemStringâ src/hash_template.c:242: warning: implicit declaration of
function âPyModule_GetDictâ src/hash_template.c:242: warning: implicit declaration of
function âPy_DECREFâ src/hash_template.c:245: warning: implicit declaration of
function âPyErr_Occurredâ src/hash_template.c:246: warning: implicit declaration of
function âPy_FatalErrorâ error: command 'gcc' failed with exit status 1 Complete output from command /usr/bin/python -c "import
setuptools; __file__='/var/install/fabric/build/pycrypto/setup.py';
execfile('/var/install/fabric/build/pycrypto/setup.py')" install
--single-version-externally-managed --record
/tmp/pip-4-ViYv-record/install-record.txt --install-headers
/var/install/fabric/lib/include: running install running build running build_py running build_ext building 'Crypto.Hash.MD2' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables
-D_GNU_SOURCE -fPIC -fPIC -Isrc/ -I/usr/include/python2.4 -c src/MD2.c -o
build/temp.linux-i686-2.4/src/MD2.o src/MD2.c:15:20: error: Python.h: No such file or directory src/MD2.c:102: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â
before â*â token In file included from src/MD2.c:118: src/hash_template.c:29: error: expected specifier-qualifier-list
before âPyObject_HEADâ src/hash_template.c:33: error: expected â=â, â,â, â;â, âasmâ or
â__attribute__â before âPyTypeObjectâ src/hash_template.c: In function ânewALGobjectâ: src/hash_template.c:42: warning: implicit declaration of
function âPyObject_Newâ src/hash_template.c:42: error: expected _expression_ before
âALGobjectâ src/hash_template.c:42: warning: assignment makes pointer from
integer without a cast src/hash_template.c: At top level: src/hash_template.c:49: error: expected â)â before â*â token src/hash_template.c:64: error: expected â=â, â,â, â;â, âasmâ or
â__attribute__â before â*â token src/hash_template.c:83: error: expected â=â, â,â, â;â, âasmâ or
â__attribute__â before â*â token src/hash_template.c:95: error: expected â=â, â,â, â;â, âasmâ or
â__attribute__â before â*â token src/hash_template.c:130: error: expected â=â, â,â, â;â, âasmâ or
â__attribute__â before â*â token src/hash_template.c:145: error: expected â=â, â,â, â;â, âasmâ or
â__attribute__â before âALG_methodsâ src/hash_template.c:154: error: expected â=â, â,â, â;â, âasmâ or
â__attribute__â before â*â token src/hash_template.c:163: error: expected â=â, â,â, â;â, âasmâ or
â__attribute__â before âALGtypeâ src/hash_template.c:188: error: expected â=â, â,â, â;â, âasmâ or
â__attribute__â before â*â token src/hash_template.c:219: error: array type has incomplete
element type src/hash_template.c:220: error: âPyCFunctionâ undeclared here
(not in a function) src/hash_template.c:220: error: expected â}â before âALG_newâ src/hash_template.c: In function âinitMD2â: src/hash_template.c:236: error: âPyObjectâ undeclared (first use
in this function) src/hash_template.c:236: error: (Each undeclared identifier is
reported only once src/hash_template.c:236: error: for each function it appears
in.) src/hash_template.c:236: error: âmâ undeclared (first use in
this function) src/hash_template.c:238: error: âALGtypeâ undeclared (first use
in this function) src/hash_template.c:238: error: âPyType_Typeâ undeclared (first
use in this function) src/hash_template.c:239: warning: implicit declaration of
function âPy_InitModuleâ src/hash_template.c:242: error: âoâ undeclared (first use in
this function) src/hash_template.c:242: warning: implicit declaration of
function âPyInt_FromLongâ src/hash_template.c:242: warning: implicit declaration of
function âPyDict_SetItemStringâ src/hash_template.c:242: warning: implicit declaration of
function âPyModule_GetDictâ src/hash_template.c:242: warning: implicit declaration of
function âPy_DECREFâ src/hash_template.c:245: warning: implicit declaration of
function âPyErr_Occurredâ src/hash_template.c:246: warning: implicit declaration of
function âPy_FatalErrorâ error: command 'gcc' failed with exit status 1 ---------------------------------------- Command /usr/bin/python -c "import setuptools;
__file__='/var/install/fabric/build/pycrypto/setup.py';
execfile('/var/install/fabric/build/pycrypto/setup.py')" install
--single-version-externally-managed --record /tmp/pip-4-ViYv-record/install-record.txt
--install-headers /var/install/fabric/lib/include failed with error code 1 Storing complete log in ./pip-log.txt From: Ben Keating
[mailto:address@hidden I had this same issue but my versions were a bit higher than
yours. You may want to try removing fabric and pycrypto and
re-initiate the install (i assume pip?). I found that ``--upgrade`` broke
things but simply issuing a ``pip install fabric`` against pypi installed 0.9.2
w/ the appropriate version of Pycrypto.. I think, anyway. I didn't take notes on this, would love to
hear if others have experienced the same... about the only issue i stumble
across when deploying lately... On Thu, Sep 23, 2010 at 12:27 PM, Yungwei Chen <address@hidden> wrote: Hi, |
[Prev in Thread] | Current Thread | [Next in Thread] |