I am trying to instal Kivy by following the instructions on this page.
I already installed Cython and Pygame, yet when I try to install Kivy from the command line the following error appears before the code stops executing:
/usr/bin/clang -bundle -undefined dynamic_lookup -g build/temp.macosx-10.6-intel-
2.7/kivy/graphics/texture.o -o
/Applications/Kivy.app/Contents/Resources/kivy/kivy/graphics/texture.so -
F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/
Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks -framework OpenGL
-arch x86_64 -lm
Any idea what might be causing this? I can post more details of the error if necessary. Thanks.
Related
I am trying to install a package called PySIT to be run with Python, and have followed the instructions on this install page (https://pysit.readthedocs.io/en/latest/install.html) using pip on my terminal to install PySIT.
I am using macOS Catalina for this, and have Anaconda installed on my computer.
This is the output I get on my terminal when I run the command: python setup.py install
gcc-8 -fno-strict-aliasing -I/Users/KBrindha/anaconda2/include -arch x86_64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/KBrindha/anaconda2/lib/python2.7/site-packages/numpy/core/include -Ipysit/solvers/fd_tools -I/Users/KBrindha/anaconda2/include/python2.7 -c pysit/solvers/constant_density_acoustic/time/scalar/solvers_wrap.cxx -o build/temp.macosx-10.6-x86_64-2.7/pysit/solvers/constant_density_acoustic/time/scalar/solvers_wrap.o -O3 -fopenmp -ffast-math
unable to execute 'gcc-8': No such file or directory
error: command 'gcc-8' failed with exit status 1
Any help on how to bypass this issue or install gcc-8 would be appreciated.
For further information, I have Xcode and Xcode Command Line Tools installed in my computer.
I also have "just" gcc (not gcc-8) installed at /usr/bin/gcc.
The authors inserted fixed names for compilers right into their setup.py. This is a bug and I recommend to report it.
Meanwhile you can clone the repository or download source code, extract it, edit setup.py and remove or replace these fixed names. Then build with the command pip install .
I am trying to install ipopt from mac terminal, but I got the following error:
terminal
/usr/bin/clang -bundle -undefined dynamic_lookup -arch i386 -arch
x86_64 -g build/temp.macosx-10.6-intel-3.6/src/callback.o
build/temp.macosx-10.6-intel-3.6/src/pyipoptcoremodule.o
-L/usr/local/lib -lipopt -lcoinblas -lcoinmumps -lcoinmetis -lcoinlapack -ldl -lm -o build/lib.macosx-10.6-intel-3.6/pyipopt/pyipoptcore.cpython-36m-darwin.so
ld:
library not found for -lipopt
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
error: command '/usr/bin/clang' failed with exit status 1
ipopt library is missing. Try
brew install homebrew/science/ipopt
or https://projects.coin-or.org/Ipopt/wiki/Ipopt_on_Mac_OS_X
then run pip install ipopt again.
i'm not sure if it's too late, but you can try here
git clone https://github.com/coin-or/Ipopt
make
make test
make install
that includes the missing files Ipopt/src/Interfaces/IpIpStdCInterface.h that you mentioned before
I followed these steps to install the GEOS libraries (source ). I successfully installed the GEOS library. My problem is in the following step:
cd back to the top level basemap directory (basemap-X.Y.Z) and
run the usual 'python setup.py install'. Check your installation
by running "from mpl_toolkits.basemap import Basemap" at the python
prompt.
When I run the setup.py file I get the following error:
distutils.errors.CompileError: Command "gcc-4.2 -fno-strict-aliasing -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Isrc -c nad2bin.c -o nad2bin.o" failed with exit status 127
Im working with a Mac with OS version 10.9.2.
I have installed the gcc compiler through the command line tools package in Xcode.
My gcc compiler info:
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix
Has anyone succesffuly installed PyODBC on snow leopard?
I'm getting the error below. (I also submitted a bug here too) Any ideas how to fix this and get it installed?
Here is the output I'm getting:
$ python setup.py install
running install
running bdist_egg
running egg_info
writing pyodbc.egg-info/PKG-INFO
writing top-level names to pyodbc.egg-info/top_level.txt
writing dependency_links to pyodbc.egg-info/dependency_links.txt
reading manifest file 'pyodbc.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pyodbc.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.6-universal/egg
running install_lib
running build_ext
building 'pyodbc' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -DPYODBC_VERSION=2.1.8 -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c /Users/pinerog/Downloads/pyodbc-2.1.8/src/buffer.cpp -o build/temp.macosx-10.6-universal-2.6/Users/pinerog/Downloads/pyodbc-2.1.8/src/buffer.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++
/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/datetime.h:186: warning: ‘PyDateTimeAPI’ defined but not used
/usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler (/usr/bin/../libexec/gcc/darwin/ppc/as or /usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not installed
Installed assemblers are:
/usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64
/usr/bin/../libexec/gcc/darwin/i386/as for architecture i386
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++
/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/datetime.h:186: warning: ‘PyDateTimeAPI’ defined but not used
/Users/pinerog/Downloads/pyodbc-2.1.8/src/buffer.cpp:58: fatal error: error writing to -: Broken pipe
compilation terminated.
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++
/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/datetime.h:186: warning: ‘PyDateTimeAPI’ defined but not used
lipo: can't open input file: /var/folders/z3/z3Y30fNyGvennzCS3hWhkLlN-Ec/-Tmp-//ccZURNsn.out (No such file or directory)
error: command 'gcc-4.2' failed with exit status 1
Versions: PyODBC 2.1.8, Mac 10.6.7, and Python 2.6.1
Your problem is likely the combination of xcode 4 and setuptools. See this error:
/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/datetime.h:186: warning: ‘PyDateTimeAPI’ defined but not used
/usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler (/usr/bin/../libexec/gcc/darwin/ppc/as or /usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not installed
Installed assemblers are:
/usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64
/usr/bin/../libexec/gcc/darwin/i386/as for architecture i386
setuptools tries to compile for ppc but xcode 4 no longer supports it.
Try compiling like this:
ARCHFLAGS="-arch i386 -arch x86_64" python setup.py install
I use macports to install pyodbc
sudo port install py26-odbc
py26-odbc is for python 2.6. If you use Python 2.7, the name would be py27-odbc
I've taken a library that is distributed as a binary lib (.a) and header, written some c++ code against it, and want to wrap the results up in a python module.
I've done this here.
The problem is that when importing this module on Mac OSX (I've tried 10.5 and 10.6), I get the following error:
dlopen(/Library/Python/2.5/site-packages/dirac.so, 2): Symbol not found: _DisposePtr
Referenced from: /Library/Python/2.5/site-packages/dirac.so
Expected in: dynamic lookup
This looks like symbols defined in the Carbon framework aren't being properly resolved, but I'm not sure what to do about that. I am supplying -framework Carbon to distutil.core.Extension's extra_link_args parameter, so I'm not sure what else I should do.
Any help would be much appreciated.
Update:
The compile line generated by setup.py looks like this:
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -Os -Wall -Wstrict-prototypes -DMACOSX -I/usr/include/ffi -DENABLE_DTRACE -arch i386 -arch ppc -pipe -Isource -I/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/numpy/core/include -I/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/numpy/numarray -I/usr/lib/python/2.5/site-packages/numpy/numarray/numpy -I/usr/lib/python/2.5/site-packages/numpy/numarray -I/usr/lib/python/2.5/site-packages/numpy/core/include -I/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c source/Dirac_LE.cpp -o build/temp.macosx-10.5-i386-2.5/source/Dirac_LE.o
The linker line looks like this:
g++ -Wl,-F. -bundle -undefined dynamic_lookup -arch i386 -arch ppc build/temp.macosx-10.5-i386-2.5/diracmodule.o build/temp.macosx-10.5-i386-2.5/source/Dirac_LE.o -Llibs/MacOSX -lDiracLE -o build/lib.macosx-10.5-i386-2.5/dirac.so -framework Carbon
otool reports:
dirac.so:
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.5)
Update 2:
On MacOS 10.5, modifying the dlopen flags from the default of RTLD_NOW to RTLD_LAZY solves the problem. However, this does not work on Mac OS 10.6.
On 10.6, the following sequence allows the library to run properly, although I'm not sure why:
python setup.py build -v
run the linker line (printed to console by setup.py) again, manually.
python setup.py install
I'm still looking for a good answer as to how to get this to work properly. Thanks!
You're going to kick yourself when you see the answer to this! Try changing this:
link_args = ['-framework Carbon'] if platform == 'Darwin' else []
to this:
link_args = ['-framework', 'Carbon'] if platform == 'Darwin' else []
Once I made this change I was able to do a clean build and import the module straight away :)