I'm trying to usepip install mysql-pythoninside a virtualenv container and am getting the errorbuilding '_mysql' extensiongcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Dversion_info=(1,2,4,'final',1) -D__version__=1.2.4 -I/usr/include/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -fPIC -fPIC -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -DMY_PTHREAD_FASTMUTEX=1_mysql.c:1:0: error: CPU you selected does not support x86-64 instruction seterror: command 'gcc' failed with exit status 1Why is gcc trying to use -march=i686 when I'm on a 64-bit system and using a 64-bit version of Python?
Pip install - CPU you selected does not support x86-64 instruction set
compiling;python;gcc;64bit;pip
You can set your architecture manually by setting the CFLAGS environmental variable.CFLAGS='-march=x86-64' pip install mysql-pythonThis variable's contents are appended to gcc's argument list.