1

大家好,我是 django 和 python 的新手,试图安装 bcrypt,这是构建一段 django 代码所必需的,我试图在我的系统上运行,我遇到了如下问题

我正在使用 python 2.7 和 v1.4 django

running build

running build_py

running build_ext

building 'bcrypt._bcrypt' extension

gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c bcrypt/bcrypt_python.c -o build/temp.macosx-10.6-intel-2.7/bcrypt/bcrypt_python.o

In file included from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h:4,

                 from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:85,

                 from bcrypt/bcrypt_python.c:17:

/Developer/SDKs/MacOSX10.6.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory

In file included from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/unicodeobject.h:4,

from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:85,

from bcrypt/bcrypt_python.c:17:

/Developer/SDKs/MacOSX10.6.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory

lipo: can't figure out the architecture type of: /var/folders/2s/n9wb5x4534nfs1cbrlph32v00000gp/T//ccb7N3qq.out

error: command 'gcc-4.2' failed with exit status 1

----------------------------------------
Command /Users/Kinnovate/Downloads/dwaiter-django-bcrypt-913d86b/my_new_env/bin/python -c "import setuptools;__file__='/Users/Kinnovate/Downloads/dwaiter-django-bcrypt-913d86b/my_new_env/build/py-bcrypt/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /var/folders/2s/n9wb5x4534nfs1cbrlph32v00000gp/T/pip-yONWs2-record/install-record.txt --install-headers /Users/Kinnovate/Downloads/dwaiter-django-bcrypt-913d86b/my_new_env/bin/../include/site/python2.7 failed with error code 1

我该如何解决?

4

1 回答 1

1
/Developer/SDKs/MacOSX10.6.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory

我相信stdarg.h.它是标准 C 库libstdc(或可能是标准 C++ 库libstdc++)的一部分。这在我看来就像libstdc丢失或不在编译器认为的位置。

谷歌搜索你的错误信息 ( stdarg.h: No such file or directory) 会在 StackOverflow 和其他地方产生一堆命中。请参阅此处此处,了解您的问题的确切解决方案。

于 2012-02-16T09:33:41.850 回答