I was wondering which programming language is this? - output

What is the output of this ?
>>>word = "positive"
>>>word[:2]

$ python
Python 2.7.10 (default, Jul 14 2015, 19:46:27)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> word = "positive"
>>> word[:2]
'po'

Related

How do I set which libstdc++.so to be linked with libarrow.so?

I built libarrow.so and pyarrow from source using gcc7.2 on Redhat 7.4.
Still, I am stuck with the following error, which seems to be caused by using different version of gcc (4.8.5 vs. 7.2.0).
[u0017649#sys-97675 ~]$ python
Python 3.7.1 (default, Dec 14 2018, 19:46:41)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyarrow
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/u0017649/anaconda3/lib/python3.7/site-packages/pyarrow/__init__.py", line 47, in <module>
from pyarrow.lib import cpu_count, set_cpu_count
ImportError: /usr/local/lib64/libarrow.so.13: undefined symbol: _ZN5boost6system16generic_categoryEv
I checked with ldconfig, and it clearly shows that libarrow.so is linked with libstdc++.so from Redhat OS (built with gcc4.8.5), not with one from my own build with gcc7.2.0.
[u0017649#sys-97675 ~]$ sudo ldd /usr/local/lib64/libarrow.so.13
/usr/local/lib64/libarrow.so.13: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /usr/local/lib64/libarrow.so.13)
/usr/local/lib64/libarrow.so.13: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /usr/local/lib64/libarrow.so.13)
/usr/local/lib64/libarrow.so.13: /lib64/libstdc++.so.6: version `CXXABI_1.3.11' not found (required by /usr/local/lib64/libarrow.so.13)
/usr/local/lib64/libarrow.so.13: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /usr/local/lib64/libarrow.so.13)
/usr/local/lib64/libarrow.so.13: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/local/lib64/libarrow.so.13)
linux-vdso64.so.1 => (0x00003fff92a70000)
libbrotlienc.so.1 => not found
libbrotlidec.so.1 => not found
libbrotlicommon.so.1 => not found
libdl.so.2 => /lib64/libdl.so.2 (0x00003fff924a0000)
librt.so.1 => /lib64/librt.so.1 (0x00003fff92470000)
liblz4.so.1 => /lib64/liblz4.so.1 (0x00003fff92430000)
libsnappy.so.1 => /lib64/libsnappy.so.1 (0x00003fff92400000)
libz.so.1 => /lib64/libz.so.1 (0x00003fff923c0000)
libzstd.so.1.3.7 => not found
libboost_system.so.1.68.0 => not found
libboost_filesystem.so.1.68.0 => not found
libboost_regex.so.1.68.0 => not found
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00003fff92230000)
I re-checked my LD_LIBRARY_PATH, but it looks OK.
[u0017649#sys-97675 ~]$ env | grep LD_
LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/lib64:/usr/local/lib:/usr/lib64:/usr/lib:/lib64:/lib:
What did I do wrong ? How do I fix this situation ? Pls help.
Never mind. I was stupid enough to use 'sudo' in front of ldd for nothing, which changed the environment variable of LD_LIBRARY_PATH. Without sudo, the proper LD_LIBRARY_PATH set, I could see everything was fine.

R Studio crashing on Mac OS X 10.11.6

I wonder if someone can help guide me on how I can preempt a crash of R studio. R Studio has now crashed on three separate occasions, each time 9 minutes after running the following code in an attempt to transform a dummy-variabled data set into a dataframe:
trsf <- events.data.frame(predict(dmy, newdata = events))
In the middle of running the code, RStudio "quits unexpectedly" and I get the bomb dialog box that says "R session aborted. R encountered a fatal error. The session was terminated," and then gives me the option of starting a new session. The code that was successfully executed before running that command was:
dmy <- dummyVars(" ~ .", data = events)
Before the above command I established a connection between R Studio to my MySQL database, and then successfully read in a table from that database into R studio.
I followed the instructions at the following link to try and recover a crash report, but I couldn't find it in the locations specified:
https://support.rstudio.com/hc/en-us/articles/200554776-RStudio-Crash-Report
The following entry showed up in the Console right when R Studio crashed:
7/30/17 11:25:53.000 AM kernel[0]: low swap: killing pid 476 (rsession)
I tried updating R studio to version 1.1.319, restarted the computer, and tried again from scratch with an empty session, but to no avail, as I continue to get the fatal error message at the same point in the process. I then tried to reduce the size of the dataset queried of the table (5.8 GiB table with 7,201,341 rows large) by at least half by querying data (from 1997-2016, instead of data from 1974-2016).
I ran the following command in a terminal:
/Applications/RStudio.app/Contents/MacOS/RStudio --run-diagnostics
as mentioned here:
https://support.rstudio.com/hc/en-us/community/posts/212693307-RStudio-crash-every-time-upon-new-Rmd-file-creation
Here is the output from the text file that was created, although I'm not sure how relevant it is:
[1] "1.1.319"
$R
[1] "/usr/local/bin/R"
$pdflatex
[1] ""
$bibtex
[1] ""
$gcc
[1] "/usr/bin/gcc"
$git
[1] "/usr/bin/git"
$svn
[1] "/usr/bin/svn"
R version 3.4.0 (2017-04-21)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: OS X El Capitan 10.11.6
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.0 tools_3.4.0
SysInfo:
sysname
"Darwin"
release
"15.6.0"
version
"Darwin Kernel Version 15.6.0: Sun Jun 4 21:43:07 PDT 2017; root:xnu-3248.70.3~1/RELEASE_X86_64"
nodename
“xxxx-Mac-Pro"
machine
"x86_64"
login
"xxxx"
user
"xxxx"
effective_user
"xxxx"
R Version:
_
platform x86_64-apple-darwin15.6.0
arch x86_64
os darwin15.6.0
system x86_64, darwin15.6.0
status
major 3
minor 4.0
year 2017
month 04
day 21
svn rev 72570
language R
version.string R version 3.4.0 (2017-04-21)
nickname You Stupid Darkness
$`_`
[1] "/Applications/RStudio.app/Contents/MacOS/RStudio"
$`__CF_USER_TEXT_ENCODING`
[1] "0x1F5:0x0:0x0"
$Apple_PubSub_Socket_Render
[1] "/private/tmp/com.apple.launchd.R8X6ErkBu8/Render"
$CLICOLOR_FORCE
[1] "1"
$DYLD_FALLBACK_LIBRARY_PATH
[1] "/Library/Frameworks/R.framework/Resources/lib:/Users/xxxx/lib:/usr/local/lib:/usr/lib:::/lib:/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/server"
$EDITOR
[1] "vi"
$GIT_ASKPASS
[1] "rpostback-askpass"
$HOME
[1] "/Users/xxxx"
$LANG
[1] "en_US.UTF-8"
$LC_CTYPE
[1] "en_US.UTF-8"
$LN_S
[1] "ln -s"
$LOGNAME
[1] “xxxx”
$MAKE
[1] "make"
$OLDPWD
[1] "/Users/xxxx”
$PAGER
[1] "/usr/bin/less"
$PATH
[1] "/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
$PWD
[1] "/Users/xxxx”
$R_BROWSER
[1] "/usr/bin/open"
$R_BZIPCMD
[1] "/usr/bin/bzip2"
$R_DOC_DIR
[1] "/Library/Frameworks/R.framework/Resources/doc"
$R_GZIPCMD
[1] "/usr/bin/gzip"
$R_HOME
[1] "/Library/Frameworks/R.framework/Resources"
$R_INCLUDE_DIR
[1] "/Library/Frameworks/R.framework/Resources/include"
$R_LIBS_SITE
[1] ""
$R_LIBS_USER
[1] "~/Library/R/3.4/library"
$R_PAPERSIZE
[1] "a4"
$R_PDFVIEWER
[1] "/usr/bin/open"
$R_PLATFORM
[1] "x86_64-apple-darwin15.6.0"
$R_PRINTCMD
[1] "lpr"
$R_QPDF
[1] "/Library/Frameworks/R.framework/Resources/bin/qpdf"
$R_RD4PDF
[1] "times,inconsolata,hyper"
$R_SESSION_TMPDIR
[1] "/var/folders/ml/3khdh0ns3410w6qzm2tw6psc0000gn/T//RtmpCpoqW2"
$R_SHARE_DIR
[1] "/Library/Frameworks/R.framework/Resources/share"
$R_SYSTEM_ABI
[1] "osx,gcc,gxx,gfortran,?"
$R_TEXI2DVICMD
[1] "/usr/local/bin/texi2dvi"
$R_UNZIPCMD
[1] "/usr/bin/unzip"
$R_ZIPCMD
[1] "/usr/bin/zip"
$RMARKDOWN_MATHJAX_PATH
[1] "/Applications/RStudio.app/Contents/Resources/resources/mathjax-26"
$RS_RPOSTBACK_PATH
[1] "/Applications/RStudio.app/Contents/MacOS/rpostback"
$RS_SHARED_SECRET
[1] "5ff181b1-d899-4d78-9493-06b24535ea1b"
$RSTUDIO
[1] "1"
$RSTUDIO_CONSOLE_COLOR
[1] "256"
$RSTUDIO_CONSOLE_WIDTH
[1] "80"
$RSTUDIO_PANDOC
[1] "/Applications/RStudio.app/Contents/MacOS/pandoc"
$RSTUDIO_SESSION_PORT
[1] "40358"
$RSTUDIO_USER_IDENTITY
[1] "xxxx"
$RSTUDIO_WINUTILS
[1] "bin/winutils"
$SED
[1] "/usr/bin/sed"
$SHELL
[1] "/bin/bash"
$SHLVL
[1] "1"
$SSH_AUTH_SOCK
[1] "/private/tmp/com.apple.launchd.JwE0qrvHVe/Listeners"
$TAR
[1] "/usr/bin/tar"
$TERM
[1] "xterm-256color"
$TERM_PROGRAM
[1] "Apple_Terminal"
$TERM_PROGRAM_VERSION
[1] "361.1"
$TERM_SESSION_ID
[1] "F96A6E56-2585-4164-B6BC-470CE6D70216"
$TMPDIR
[1] "/var/folders/ml/3khdh0ns3410w6qzm2tw6psc0000gn/T/"
$USER
[1] “xxxx”
$XPC_FLAGS
[1] "0x0"
$XPC_SERVICE_NAME
[1] "0"
[1] ".GlobalEnv" "tools:rstudio" "package:stats"
[4] "package:graphics" "package:grDevices" "package:utils"
[7] "package:datasets" "package:methods" "Autoloads"
[10] "package:base"
Log file: rdesktop.log
--------------------------------------------------
(Empty)
Log file: rsession-xxxx.log
--------------------------------------------------
16 Jun 2017 04:17:01 [rsession-xxxx] WARNING Abort requested; LOGGED FROM: bool rstudio::session::connection::checkForAbort(boost::shared_ptr<HttpConnection>, const boost::function<void ()>) /Users/rstudio/rstudio/src/cpp/session/http/SessionHttpConnectionUtils.cpp:136
16 Jun 2017 04:51:54 [rsession-xxxx] WARNING Abort requested; LOGGED FROM: bool rstudio::session::connection::checkForAbort(boost::shared_ptr<HttpConnection>, const boost::function<void ()>) /Users/rstudio/rstudio/src/cpp/session/http/SessionHttpConnectionUtils.cpp:136
16 Jun 2017 05:07:20 [rsession-xxxx] WARNING Abort requested; LOGGED FROM: bool rstudio::session::connection::checkForAbort(boost::shared_ptr<HttpConnection>, const boost::function<void ()>) /Users/rstudio/rstudio/src/cpp/session/http/SessionHttpConnectionUtils.cpp:136
17 Jun 2017 04:12:50 [rsession-xxxx] WARNING Abort requested; LOGGED FROM: bool rstudio::session::connection::checkForAbort(boost::shared_ptr<HttpConnection>, const boost::function<void ()>) /Users/rstudio/rstudio/src/cpp/session/http/SessionHttpConnectionUtils.cpp:136
17 Jun 2017 15:35:17 [rsession-xxxx] CLIENT EXCEPTION (rsession-xxxx): (TypeError) : undefined is not an object (evaluating 'a.n.applicable');|||org/rstudio/studio/client/workbench/views/packages/PackagesPane.java#102::setPackageState|||org/rstudio/studio/client/workbench/views/packages/Packages.java#724::setViewPackageList|||org/rstudio/studio/client/workbench/views/packages/Packages.java#700::onPackageFilterChanged|||org/rstudio/studio/client/workbench/views/packages/PackagesPane.java#277::onValueChange|||com/google/gwt/event/logical/shared/ValueChangeEvent.java#127::dispatch|||com/google/web/bindery/event/shared/SimpleEventBus.java#173::doFire|||com/google/gwt/event/shared/HandlerManager.java#117::fireEvent|||com/google/gwt/event/shared/HandlerManager.java#117::fireEvent|||com/google/gwt/user/client/ui/Widget.java#127::fireEvent|||com/google/gwt/user/client/ui/Widget.java#127::fireEvent|||com/google/gwt/event/logical/shared/ValueChangeEvent.java#40::fire|||org/rstudio/core/client/widget/SearchWidget.java#163::onKeyUp|||com/google/gwt/event/dom/client/KeyUpEvent.java#55::dispatch|||com/google/web/bindery/event/shared/SimpleEventBus.java#173::doFire|||com/google/gwt/event/shared/HandlerManager.java#117::fireEvent|||com/google/gwt/event/shared/HandlerManager.java#117::fireEvent|||com/google/gwt/user/client/ui/Widget.java#127::fireEvent|||com/google/gwt/user/client/ui/Widget.java#127::fireEvent|||com/google/gwt/event/dom/client/DomEvent.java#110::fireNativeEvent|||com/google/gwt/user/client/ui/Widget.java#163::onBrowserEvent|||com/google/gwt/user/client/ui/Composite.java#78::onBrowserEvent|||com/google/gwt/user/client/DOM.java#1414::dispatchEvent|||com/google/gwt/user/client/impl/DOMImplStandard.java#312::dispatchEvent|||com/google/gwt/core/client/impl/Impl.java#244::apply|||com/google/gwt/core/client/impl/Impl.java#283::entry0|||http://127.0.0.1:9408/#-1::anonymous|||Client-ID: 33e600bb-c1b1-46bf-b562-ab5cba070b0e|||User-Agent: Mozilla/5.0 (Macintosh Intel Mac OS X 10_11_6) AppleWebKit/603.2.5 (KHTML, like Gecko)
17 Jun 2017 15:35:17 [rsession-xxxx] CLIENT EXCEPTION (rsession-xxxx): (TypeError) : undefined is not an object (evaluating 'a.n.applicable');|||org/rstudio/studio/client/workbench/views/packages/PackagesPane.java#102::setPackageState|||org/rstudio/studio/client/workbench/views/packages/Packages.java#724::setViewPackageList|||org/rstudio/studio/client/workbench/views/packages/Packages.java#700::onPackageFilterChanged|||org/rstudio/studio/client/workbench/views/packages/PackagesPane.java#277::onValueChange|||com/google/gwt/event/logical/shared/ValueChangeEvent.java#127::dispatch|||com/google/web/bindery/event/shared/SimpleEventBus.java#173::doFire|||com/google/gwt/event/shared/HandlerManager.java#117::fireEvent|||com/google/gwt/event/shared/HandlerManager.java#117::fireEvent|||com/google/gwt/user/client/ui/Widget.java#127::fireEvent|||com/google/gwt/user/client/ui/Widget.java#127::fireEvent|||com/google/gwt/event/logical/shared/ValueChangeEvent.java#40::fire|||org/rstudio/core/client/widget/SearchWidget.java#163::onKeyUp|||com/google/gwt/event/dom/client/KeyUpEvent.java#55::dispatch|||com/google/web/bindery/event/shared/SimpleEventBus.java#173::doFire|||com/google/gwt/event/shared/HandlerManager.java#117::fireEvent|||com/google/gwt/event/shared/HandlerManager.java#117::fireEvent|||com/google/gwt/user/client/ui/Widget.java#127::fireEvent|||com/google/gwt/user/client/ui/Widget.java#127::fireEvent|||com/google/gwt/event/dom/client/DomEvent.java#110::fireNativeEvent|||com/google/gwt/user/client/ui/Widget.java#163::onBrowserEvent|||com/google/gwt/user/client/ui/Composite.java#78::onBrowserEvent|||com/google/gwt/user/client/DOM.java#1414::dispatchEvent|||com/google/gwt/user/client/impl/DOMImplStandard.java#312::dispatchEvent|||com/google/gwt/core/client/impl/Impl.java#244::apply|||com/google/gwt/core/client/impl/Impl.java#283::entry0|||http://127.0.0.1:9408/#-1::anonymous|||Client-ID: 33e600bb-c1b1-46bf-b562-ab5cba070b0e|||User-Agent: Mozilla/5.0 (Macintosh Intel Mac OS X 10_11_6) AppleWebKit/603.2.5 (KHTML, like Gecko)
17 Jun 2017 15:35:17 [rsession-xxxx] CLIENT EXCEPTION (rsession-xxxx): (TypeError) : undefined is not an object (evaluating 'a.n.applicable');|||org/rstudio/studio/client/workbench/views/packages/PackagesPane.java#102::setPackageState|||org/rstudio/studio/client/workbench/views/packages/Packages.java#724::setViewPackageList|||org/rstudio/studio/client/workbench/views/packages/Packages.java#700::onPackageFilterChanged|||org/rstudio/studio/client/workbench/views/packages/PackagesPane.java#277::onValueChange|||com/google/gwt/event/logical/shared/ValueChangeEvent.java#127::dispatch|||com/google/web/bindery/event/shared/SimpleEventBus.java#173::doFire|||com/google/gwt/event/shared/HandlerManager.java#117::fireEvent|||com/google/gwt/event/shared/HandlerManager.java#117::fireEvent|||com/google/gwt/user/client/ui/Widget.java#127::fireEvent|||com/google/gwt/user/client/ui/Widget.java#127::fireEvent|||com/google/gwt/event/logical/shared/ValueChangeEvent.java#40::fire|||org/rstudio/core/client/widget/SearchWidget.java#163::onKeyUp|||com/google/gwt/event/dom/client/KeyUpEvent.java#55::dispatch|||com/google/web/bindery/event/shared/SimpleEventBus.java#173::doFire|||com/google/gwt/event/shared/HandlerManager.java#117::fireEvent|||com/google/gwt/event/shared/HandlerManager.java#117::fireEvent|||com/google/gwt/user/client/ui/Widget.java#127::fireEvent|||com/google/gwt/user/client/ui/Widget.java#127::fireEvent|||com/google/gwt/event/dom/client/DomEvent.java#110::fireNativeEvent|||com/google/gwt/user/client/ui/Widget.java#163::onBrowserEvent|||com/google/gwt/user/client/ui/Composite.java#78::onBrowserEvent|||com/google/gwt/user/client/DOM.java#1414::dispatchEvent|||com/google/gwt/user/client/impl/DOMImplStandard.java#312::dispatchEvent|||com/google/gwt/core/client/impl/Impl.java#244::apply|||com/google/gwt/core/client/impl/Impl.java#283::entry0|||http://127.0.0.1:9408/#-1::anonymous|||Client-ID: 33e600bb-c1b1-46bf-b562-ab5cba070b0e|||User-Agent: Mozilla/5.0 (Macintosh Intel Mac OS X 10_11_6) AppleWebKit/603.2.5 (KHTML, like Gecko)
18 Jun 2017 05:26:11 [rsession-xxxxxxxx] WARNING Abort requested; LOGGED FROM: bool rstudio::session::connection::checkForAbort(boost::shared_ptr<HttpConnection>, const boost::function<void ()>) /Users/rstudio/rstudio/src/cpp/session/http/SessionHttpConnectionUtils.cpp:136
20 Jun 2017 06:29:23 [rsession-xxxx] WARNING Abort requested; LOGGED FROM: bool rstudio::session::connection::checkForAbort(boost::shared_ptr<HttpConnection>, const boost::function<void ()>) /Users/rstudio/rstudio/src/cpp/session/http/SessionHttpConnectionUtils.cpp:136
21 Jun 2017 03:31:28 [rsession-xxxx] WARNING Abort requested; LOGGED FROM: bool rstudio::session::connection::checkForAbort(boost::shared_ptr<HttpConnection>, const boost::function<void ()>) /Users/rstudio/rstudio/src/cpp/session/http/SessionHttpConnectionUtils.cpp:136
Please let me know what other information I can provide and where I might find it so that I can address the problem.
Here is a screenshot of the R environment before the crash took place.
Thank you in advance

what's wrong with my keras.using theano backend

i am learning to use deeping learning to deal with physics problem.when i want to run my program by theano,there are some bad things happended.
~$ python
Python 2.7.13 (default, Jan 19 2017, 14:48:08)
[GCC 6.3.0 20170118] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import theano
Traceback (most recent call last):
File "", line 1, in
File "theano.py", line 1
%!PS-Adobe-3.0
^
SyntaxError: invalid syntax
import keras
Using Theano backend.
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python2.7/dist-packages/keras/init.py", line 3, in
from . import utils
File "/usr/local/lib/python2.7/dist-packages/keras/utils/init.py", line 6, in
from . import conv_utils
File "/usr/local/lib/python2.7/dist-packages/keras/utils/conv_utils.py", line 3, in
from .. import backend as K
File "/usr/local/lib/python2.7/dist-packages/keras/backend/init.py", line 80, in
from .theano_backend import *
File "/usr/local/lib/python2.7/dist-packages/keras/backend/theano_backend.py", line 3, in
import theano
File "theano.py", line 1
%!PS-Adobe-3.0
^
SyntaxError: invalid syntax

Getting 'File' is not a type identifier in Cython when trying to define a File pointer

My directory structure
kents-air:Cython-Test kent$ tree
.
├── main.py
├── setup.py
└── test
├── test.c
└── test.pyx
1 directory, 4 files
test.pyx
from libc.stdio cimport FILE
cdef class RandomTest:
cdef File * reader
cdef int number
def __init__(self, number):
self.number = number
def print_random(self):
print(self.number)
main.py
from .test import RandomTest
tester = RandomTest(5)
tester.print_random()
setup.py
from distutils.core import setup
from Cython.Build import cythonize
setup(
ext_modules = cythonize(["test/*.pyx"]),
)
Output
pythkents-air:Cython-Test kent$ python3 setup.py build_ext
Compiling test/test.pyx because it changed.
[1/1] Cythonizing test/test.pyx
Error compiling Cython file:
------------------------------------------------------------
...
from libc.stdio cimport FILE
cdef class RandomTest:
cdef File * reader
^
------------------------------------------------------------
test/test.pyx:4:9: 'File' is not a type identifier
Traceback (most recent call last):
File "setup.py", line 5, in <module>
ext_modules = cythonize(["test/*.pyx"]),
File "/usr/local/lib/python3.5/site-packages/Cython/Build/Dependencies.py", line 912, in cythonize
cythonize_one(*args)
File "/usr/local/lib/python3.5/site-packages/Cython/Build/Dependencies.py", line 1034, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: test/test.pyx
Version Info
kents-air:Cython-Test kent$ python3
Python 3.5.1 (default, Apr 18 2016, 11:46:32)
[GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.29)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Cython==0.24
Links I have already checked:
Declaring FILE pointers in Cython
Pass file handle to cython function

homebrew mysql os lion - CMake Error at cmake/do_abi_check.cmake:78

I recently upgraded from snow leopard to lion. I've got the latest version of Homebrew running (e.g. I ran 'brew update'). I'm trying to install mysql but I get the error below.
Googling for how to fix this has turned up nothing...
$ brew install mysql
==> Downloading http://downloads.mysql.com/archives/mysql-5.5/mysql-5.5.19.tar.gz
File already downloaded in /Users/evan/Library/Caches/Homebrew
==> Patching
patching file scripts/mysqld_safe.sh
patching file scripts/mysql_config.sh
==> cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/mysql/5.5.19 -DMYSQL_DATADIR=/usr/local/var/mysql -DINSTALL_MANDIR=/usr/local/C
==> make
Scanning dependencies of target INFO_BIN
Scanning dependencies of target INFO_SRC
Scanning dependencies of target abi_check
[ 0%] Built target INFO_SRC
Scanning dependencies of target readline
1,240d0
[ ---- I've truncated the source dump ---- ]
CMake Error at cmake/do_abi_check.cmake:78 (MESSAGE):
ABI check found difference between
/tmp/homebrew-mysql-5.5.19-mGpc/mysql-5.5.19/include/mysql/plugin_audit.h.pp
and /tmp/homebrew-mysql-5.5.19-mGpc/mysql-5.5.19/abi_check.out
Scanning dependencies of target gen_lex_hash
make[2]: *** [CMakeFiles/abi_check] Error 1
make[1]: *** [CMakeFiles/abi_check.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 1%] [ 2%] [ 2%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/readline.c.o
Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/funmap.c.o
Building CXX object sql/CMakeFiles/gen_lex_hash.dir/gen_lex_hash.cc.o
[ 2%] Built target INFO_BIN
[ 2%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/keymaps.c.o
[ 2%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/vi_mode.c.o
[ 2%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/parens.c.o
[ 2%] [ 3%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/rltty.c.o
Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/complete.c.o
Linking CXX executable gen_lex_hash
[ 3%] Built target gen_lex_hash
[ 3%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/bind.c.o
[ 3%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/isearch.c.o
[ 3%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/display.c.o
[ 3%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/signals.c.o
[ 3%] [ 4%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/kill.c.o
Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/util.c.o
[ 4%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/undo.c.o
[ 4%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/macro.c.o
[ 4%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/input.c.o
[ 4%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/callback.c.o
[ 4%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/terminal.c.o
[ 4%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/xmalloc.c.o
[ 5%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/history.c.o
[ 5%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/histsearch.c.o
[ 5%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/histexpand.c.o
[ 5%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/histfile.c.o
[ 5%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/nls.c.o
[ 5%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/search.c.o
[ 6%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/shell.c.o
[ 6%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/tilde.c.o
[ 6%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/misc.c.o
[ 6%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/text.c.o
[ 6%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/mbutil.c.o
[ 6%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/compat.c.o
[ 7%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/savestring.c.o
Linking C static library libreadline.a
[ 7%] Built target readline
make: *** [all] Error 2
==> Exit Status: 2
http://github.com/mxcl/homebrew/blob/master/Library/Formula/mysql.rb#L75
==> Environment
HOMEBREW_VERSION: 0.8.1
HEAD: 0e8ea8aae9dadda53d0dc0cf680d383981770be9
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
Hardware: quad-core 64-bit arrandale
OS X: 10.7.3
Kernel Architecture: x86_64
Xcode: 3.2.6
GCC-4.0: N/A
GCC-4.2: N/A
LLVM: build 2336
Clang: 3.1 build 318
MacPorts or Fink? false
X11: /usr/X11
System Ruby: 1.8.7-249
/usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
Which Perl: /usr/bin/perl
Which Python: /usr/bin/python
Which Ruby: /Users/evan/.rvm/rubies/ruby-1.9.3-p0/bin/ruby
==> Build Flags
CC: /usr/bin/xcrun gcc-4.2 => /Developer/usr/bin/gcc-4.2
CXX: /usr/bin/xcrun g++-4.2 => /Developer/usr/bin/g++-4.2
LD: /usr/bin/xcrun gcc-4.2 => /Developer/usr/bin/gcc-4.2
CFLAGS: -Os -w -pipe -march=core2 -msse4
CXXFLAGS: -Os -w -pipe -march=core2 -msse4
CPPFLAGS: -I/usr/local/Cellar/readline/6.2.2/include
LDFLAGS: -L/usr/local/Cellar/readline/6.2.2/lib
MAKEFLAGS: -j4
Error: Failed executing: make
UPDATE
I think thinks may be related to conflicting versions of XCode. I've installed the latest version fo XCode, but homebrew still thinks I have the old version installed
Warning: You have Xcode-3.2.6, which is outdated.
Please install Xcode 4.3.
Attempting a fix....
Alright I solved this bad boy. I'll leave this up to help anyone else who might have the same problem.
Steps to solve
run "brew doctor" - begin fixing issues
apparently I had several versions of XCode installed and it was using the old, 3.2 version
Uninstalled the old XCode using only do this in the correct directory which could be different from mine
sudo /Developer/Library/uninstall-devtools
restart and run 'brew doctor' again
Use the following command to assign the right XCode version (this may be different depending on your install)
sudo xcode-select -switch /Applications/Xcode.app
And voila! I was able to use homebrew to install mysql
This failed for me. What worked was:
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
which was suggested by brew doctor.