What steps will reproduce the problem? 1.Install using pip or download and 'python setup.py build' 2.Get error 3.
What version of the product are you using? On what operating system?
Mac OS X 10.7 Lion
setup.py error message: running build running build_ext Traceback (most recent call last): File "setup.py", line 60, in <module> main() File "setup.py", line 50, in main import sendfile ImportError: No module named sendfile
pip error msg: Downloading/unpacking py-sendfile Running setup.py egg_info for package py-sendfile
Installing collected packages: py-sendfile Running setup.py install for py-sendfile building 'sendfile' extension llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c sendfilemodule.c -o build/temp.macosx-10.7-intel-2.7/sendfilemodule.o sendfilemodule.c:219:26: error: sys/sendfile.h: No such file or directory sendfilemodule.c: In function ‘method_sendfile’: sendfilemodule.c:233: warning: implicit declaration of function ‘sendfile’ sendfilemodule.c:219:26: error: sys/sendfile.h: No such file or directory sendfilemodule.c: In function ‘method_sendfile’: sendfilemodule.c:233: warning: implicit declaration of function ‘sendfile’ lipo: can't open input file: /var/folders/y5/2y_xybc96tl2gll484mxm57m0000gp/T//ccXRDkqs.out (No such file or directory) error: command 'llvm-gcc-4.2' failed with exit status 1 Complete output from command /Users/yichuan/hulu/env_hulu/bin/python2.7 -c "import setuptools;file='/Users/yichuan/hulu/env_hulu/build/py-sendfile/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --single-version-externally-managed --record /var/folders/y5/2y_xybc96tl2gll484mxm57m0000gp/T/pip-dE6L6A-record/install-record.txt --install-headers /Users/yichuan/hulu/env_hulu/include/site/python2.7: running install
running build
running build_ext
building 'sendfile' extension
llvm-gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c sendfilemodule.c -o build/temp.macosx-10.7-intel-2.7/sendfilemodule.o
sendfilemodule.c:219:26: error: sys/sendfile.h: No such file or directory
sendfilemodule.c: In function ‘method_sendfile’:
sendfilemodule.c:233: warning: implicit declaration of function ‘sendfile’
sendfilemodule.c:219:26: error: sys/sendfile.h: No such file or directory
sendfilemodule.c: In function ‘method_sendfile’:
sendfilemodule.c:233: warning: implicit declaration of function ‘sendfile’
lipo: can't open input file: /var/folders/y5/2y_xybc96tl2gll484mxm57m0000gp/T//ccXRDkqs.out (No such file or directory)
error: command 'llvm-gcc-4.2' failed with exit status 1
Command /Users/yichuan/hulu/env_hulu/bin/python2.7 -c "import setuptools;file='/Users/yichuan/hulu/env_hulu/build/py-sendfile/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --single-version-externally-managed --record /var/folders/y5/2y_xybc96tl2gll484mxm57m0000gp/T/pip-dE6L6A-record/install-record.txt --install-headers /Users/yichuan/hulu/env_hulu/include/site/python2.7 failed with error code 1
Comment #1
Posted on Sep 6, 2011 by Helpful RabbitFalse alarm, only pip version is broken. However, setup.py do require to run twice to get rid of errors. (requires sendfile in sendfile setup.py)
Comment #2
Posted on Jan 12, 2012 by Happy MonkeyI'm not sure what was the exact problem here. Can you try again with the current version? I'm about to make a package release.
Comment #3
Posted on Mar 20, 2012 by Swift ElephantComment deleted
Comment #4
Posted on Mar 20, 2012 by Swift ElephantComment deleted
Comment #5
Posted on Mar 20, 2012 by Swift ElephantComment deleted
Comment #6
Posted on Mar 20, 2012 by Helpful BirdI am having exactly the same problem installing pysendfile-2.0.0.tar.gz On Ubuntu server 10.10
~/pysendfile-read-only$ python setup.py install running install running bdist_egg running egg_info creating pysendfile.egg-info writing pysendfile.egg-info/PKG-INFO writing top-level names to pysendfile.egg-info/top_level.txt writing dependency_links to pysendfile.egg-info/dependency_links.txt writing manifest file 'pysendfile.egg-info/SOURCES.txt' writing manifest file 'pysendfile.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg running install_lib running build_ext building 'sendfile' extension creating build creating build/temp.linux-x86_64-2.7 gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c sendfilemodule.c -o build/temp.linux-x86_64-2.7/sendfilemodule.o sendfilemodule.c:43: fatal error: Python.h: No such file or directory compilation terminated. error: command 'gcc' failed with exit status 1
Comment #7
Posted on Mar 20, 2012 by Happy Monkey@Paul - run:
sudo apt-get install python-dev
...first.
Status: New
Labels:
Type-Defect
Priority-Medium