Hi all im new to django and python trying to install bcrypt which is needed for building a piece of django code im trying to run on my system, im running into a problem as below
im using python 2.7 and 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
how do i fix this?
/Developer/SDKs/MacOSX10.6.sdk/usr/include/stdarg.h:4:25: error: stdarg.h: No such file or directory
I believe stdarg.h. is part of the standard C library, libstdc (or possibly the standard C++ library libstdc++.) This smells to me like libstdc is missing or not located where the compiler thinks it is.
Googling your error message (stdarg.h: No such file or directory) produces a stack of hits on StackOverflow and elsewhere. See here or here for what appear to be exact solutions to your problem.
Related
When I try to execute pip install dulwich, I end up with a wall of red complaining about clang. Here's the last bit:
Please check your Xcode installation
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/openssl/include -I/usr/local/include -I/usr/local/opt/openssl#1.1/include -I/usr/local/opt/sqlite/include -I/Users/alaird/Developer/py3venv/include -I/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c dulwich/_objects.c -o build/temp.macosx-10.14-x86_64-3.7/dulwich/_objects.o
clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk' [-Wmissing-sysroot]
In file included from dulwich/_objects.c:20:
/usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m/Python.h:25:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^~~~~~~~~
1 error generated.
error: command 'clang' failed with exit status 1
----------------------------------------
ERROR: Command "/Users/alaird/Developer/py3venv/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/private/var/folders/63/r_rf7mhj14b4c42mfkkl06t8rg1b1r/T/pip-install-b9wlh7xh/dulwich/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/63/r_rf7mhj14b4c42mfkkl06t8rg1b1r/T/pip-record-_v0dq_sp/install-record.txt --single-version-externally-managed --compile --install-headers /Users/alaird/Developer/py3venv/include/site/python3.7/dulwich" failed with error code 1 in /private/var/folders/63/r_rf7mhj14b4c42mfkkl06t8rg1b1r/T/pip-install-b9wlh7xh/dulwich/
I've gone down a lot of "clang failed with exit status 1" rabbit holes on Google, problem is that's too generic. To answer a few questions:
Yes, Xcode is the latest version, and command-line tools have been installed (I'm on OS X 10.14.6, so this is now managed through app updates).
This was a previously working installation. This error began occuring after I did a make clean, which blew away my venv.
Attempting to install the latest setuptools runs in to the same error, so feels like the error pointing to Xcode/my build environment (and not dulwich) is the correct culprit.
Doing a brew update also gives me the same clang barf. I think something got hosed when I upgraded to Mojave.
Ideas?
Ah-ha!
I started looking at the warning instead of the error:
no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk' [-Wmissing-sysroot]
And this led me to notice a SDK version number was hardcoded ... which seems stupid. So I built a symlink:
ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
Depending on your system configuration, you may need to build a different symlink (there was also a MacOSX10.15.sdk folder).
Then it worked! No issues with pip (including installing dulwich and pycrypto), no issues with brew, and all is well with my development environment again!
I also did:
export CFLAGS="-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
However, I don't believe that was what did it, since after starting a new session all still worked. So it was probably the symlink above that resolved it. Hope this helps others!
Hello fellow Programmers,
currently I am trying to install Charm-Crypto 0.43 on my Ubuntu. Unfortunately nothing seems to work. I tried the linked manual install, as well as pip install charm-crypto
I always get this Error log:
[...]
running build_ext
building 'charm.core.math.pairing' extension
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/charm
creating build/temp.linux-x86_64-3.6/charm/core
creating build/temp.linux-x86_64-3.6/charm/core/math
creating build/temp.linux-x86_64-3.6/charm/core/math/pairing
creating build/temp.linux-x86_64-3.6/charm/core/utilities
creating build/temp.linux-x86_64-3.6/charm/core/benchmark
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DBENCHMARK_ENABLED=1 -Icharm/core/utilities/ -Icharm/core/benchmark/ -I/usr/include/python3.6m -I/home/debbi/Documents/env/01_chainmed/include/python3.6m -c charm/core/math/pairing/pairingmodule.c -o build/temp.linux-x86_64-3.6/charm/core/math/pairing/pairingmodule.o
In file included from charm/core/math/pairing/pairingmodule.c:30:0:
charm/core/math/pairing/pairingmodule.h:38:10: fatal error: pbc/pbc.h: No such file or directory
#include <pbc/pbc.h>
^~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/home/debbi/Documents/env/01_chainmed/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-wfcawqbr/charm-crypto/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-pfeoo7we/install-record.txt --single-version-externally-managed --compile --install-headers /home/debbi/Documents/env/01_chainmed/include/site/python3.6/charm-crypto" failed with error code 1 in /tmp/pip-install-wfcawqbr/charm-crypto/
I tried every suggested install of python-dev and libssl etc. I could find by googling (this, and this, and this just to name a view). I also tried installing it using python2.7 and 3.6 Unfortunately nothing worked for me.
Maybe anyone knows this Problem?
Thank You for your time in advance.
There is this Website: http://pages.cs.wisc.edu/~ace/install-charm.html
Just follow the Instructions, but for me I had to manually check out the Charm-0.50 dev branch and then install this version.
hello guys i tried to install a python module called gmpy2 with pip install gmpy2 but error occurs during wheel building
running install
running build
running build_ext
building 'gmpy2' extension
creating build
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/src
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-
prototypes -g -fdebug-prefix-map=/build/python3.6-LpWKty/python3.6-
3.6.5~rc1=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-
protector-strong -Wformat -Werror=format-security -Wdate-time -
D_FORTIFY_SOURCE=2 -fPIC -DWITHMPFR -DWITHMPC -
I/usr/include/python3.6m -c src/gmpy2.c -o build/temp.linux-x86_64-
3.6/src/gmpy2.o
In file included from src/gmpy2.c:426:0:
src/gmpy.h:252:12: fatal error: mpfr.h: No such file or directory
# include "mpfr.h"
^~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
`
`
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools,
tokenize;__file__='/tmp/pip-build-
onv0x975/gmpy2/setup.py';f=getattr(tokenize, 'open', open)
(__file__);code=f.read().replace('\r\n',
'\n');f.close();exec(compile(code, __file__, 'exec'))" install --
record /tmp/pip-izolloyr-record/install-record.txt --single-version-
externally-managed --compile" failed with error code 1 in /tmp/pip-
build-onv0x975/gmpy2/
I tried both pip and pip3
You need to download MPFR source code and compile it. See installation manual: https://gmpy2.readthedocs.io/en/latest/intro.html#installation
I am trying to deploy a Python application for Image recognition which uses tesseract, tesserocr with leptonica. But I get the following error while deploying it on Bluemix.
Complete output from command /app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-0jQxGj/tesserocr/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-yIT1DQ-record/install-record.txt --single-version-externally-managed --compile:
pkg-config failed to find tesseract/lept libraries: Package tesseract was not found in the pkg-config search path.
Perhaps you should add the directory containing `tesseract.pc'
No package 'tesseract' found
to the PKG_CONFIG_PATH environment variable
Failed to extract tesseract version from executable: [Errno 2] No such file or directory
Supporting tesseract v3.04.00
Building with configs: {'libraries': ['tesseract', 'lept'], 'cython_compile_time_env': {'TESSERACT_VERSION': 197632}}
running install
running build
running build_ext
building 'tesserocr' extension
creating build
creating build/temp.linux-x86_64-2.7
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/app/.heroku/python/include/python2.7 -c tesserocr.cpp -o build/temp.linux-x86_64-2.7/tesserocr.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
tesserocr.cpp:555:34: fatal error: leptonica/allheaders.h: No such file or directory
#include "leptonica/allheaders.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
It looks as though the build pack you are using does not have the required libraries to compile tesseract.
You could try a different buildpack such as python-tesseract-buildpack. Note that this buildpack is quite out of date with the python-buildpack from which it was originally forked (407 commits behind cloudfoundry:master).
If the above buildpack works for you, you may want to create your own custom buildpack based on the latest python buildpack and the changes made to it by the python-tesseract-buildpack. There is more information on buildpacks here:
https://docs.cloudfoundry.org/buildpacks/
https://docs.cloudfoundry.org/buildpacks/developing-buildpacks.html
NOTE: This same error also occurs when using easy_install, other ways of installation...
I'm facing almost exactly the same problem as I'm trying to install psycopg2 onto Mac OS 10.6.3; it claims it can't find "stdarg.h" but I can see it's there; what should I do? , except I'm on OSX Lion (10.7) and I'm on Python v2.7.
It's also seemingly related to Can't install psycopg2 with pip in virtualenv on Mac OS X 10.7 but I get a different error message.
I made a new question because solutions that worked for OSX 10.6 (such as http://mail.python.org/pipermail/pythonmac-sig/2009-September/021617.html) don't work for me.
I'm trying to do the tutorial for Django on Heroku (https://devcenter.heroku.com/articles/django),
and I run into an error trying to install psycopg2. Here's the trace:
Downloading/unpacking psycopg2
Running setup.py egg_info for package psycopg2
no previously-included directories found matching 'doc/src/_build'
Installing collected packages: psycopg2
Running setup.py install for psycopg2
building 'psycopg2._psycopg' 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 -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.4.5 (dt dec pq3 ext)" -DPG_VERSION_HEX=0x090005 -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/include -I/usr/include/postgresql/server -c psycopg/psycopgmodule.c -o build/temp.macosx-10.6-intel-2.7/psycopg/psycopgmodule.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 ./psycopg/psycopg.h:30,
from psycopg/psycopgmodule.c:27:
/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 ./psycopg/psycopg.h:30,
from psycopg/psycopgmodule.c:27:
/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/tmp//ccHla8Gp.out
error: command 'gcc-4.2' failed with exit status 1
Complete output from command /Users/AndyFang/Desktop/code/venv/bin/python -c "import setuptools;__file__='/Users/AndyFang/Desktop/code/venv/build/psycopg2/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-ONvqYm-record/install-record.txt --install-headers /Users/AndyFang/Desktop/code/venv/bin/../include/site/python2.7:
running install
running build
running build_py
running build_ext
building 'psycopg2._psycopg' 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 -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.4.5 (dt dec pq3 ext)" -DPG_VERSION_HEX=0x090005 -DPSYCOPG_EXTENSIONS=1 -DPSYCOPG_NEW_BOOLEAN=1 -DHAVE_PQFREEMEM=1 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I. -I/usr/include -I/usr/include/postgresql/server -c psycopg/psycopgmodule.c -o build/temp.macosx-10.6-intel-2.7/psycopg/psycopgmodule.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 ./psycopg/psycopg.h:30,
from psycopg/psycopgmodule.c:27:
/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 ./psycopg/psycopg.h:30,
from psycopg/psycopgmodule.c:27:
/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/tmp//ccHla8Gp.out
error: command 'gcc-4.2' failed with exit status 1
----------------------------------------
Command /Users/AndyFang/Desktop/code/venv/bin/python -c "import setuptools;__file__='/Users/AndyFang/Desktop/code/venv/build/psycopg2/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-ONvqYm-record/install-record.txt --install-headers /Users/AndyFang/Desktop/code/venv/bin/../include/site/python2.7 failed with error code 1 in /Users/AndyFang/Desktop/code/venv/build/psycopg2
Storing complete log in /Users/AndyFang/.pip/pip.log
I don't know why it can't find stdarg.h! I've looked into a lot of answers online, to no avail.
It looks like you have a broken build environment. stdarg.h is part of the core gcc headers. On my (Fedora 16 Linux) system stdarg.h is in /usr/lib/gcc/x86_64-redhat-linux/4.6.2/include/stdarg.h and is part of the gcc package.
On Apple platforms I expect it's shipped with XCode. At a guess, you have more than one compiler/toolchain installed, and their include paths are getting muddled. I suggest clean-uninstalling XCode and all its friends, deleting the relevant directories to get rid of stragglers, then reinstalling the lot.
It may be that your Xcode installation is incomplete. The following post helped me get it working:
https://stackoverflow.com/a/10326004/1361851
Had to install "command line tools" for Xcode (follow directions in SO answer above) and then I was able to pip install with the virtualenv.