shunwang / numexpr

Automatically exported from code.google.com/p/numexpr
MIT License
0 stars 0 forks source link

Unable to install numexpr-1.3.1 on Mac OSX v 10.6.4 #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

$ python setup.py install (from numpexpr directory)

What is the expected output? What do you see instead?

Markm-Mac:numexpr-1.3.1 markhmoulton$ python setup.py install
Warning: Assuming default configuration (numexpr/tests/{setup_tests,setup}.py 
was not found)
Appending numexpr.tests configuration to numexpr
Ignoring attempt to set 'name' (from 'numexpr' to 'numexpr.tests')
running install
running bdist_egg
running egg_info
running build_src
build_src
building py_modules sources
building extension "numexpr.interpreter" sources
build_src: building npy-pkg config files
writing numexpr.egg-info/PKG-INFO
writing top-level names to numexpr.egg-info/top_level.txt
writing dependency_links to numexpr.egg-info/dependency_links.txt
reading manifest file 'numexpr.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files found matching 'numexpr/__config__.py'
warning: no previously-included files found matching 'RELEASING.txt'
writing manifest file 'numexpr.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.3-fat/egg
running install_lib
running build_py
copying build/src.macosx-10.3-fat-2.6/numexpr/__config__.py -> 
build/lib.macosx-10.3-fat-2.6/numexpr
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
building 'numexpr.interpreter' extension
compiling C sources
C compiler: gcc-4.0 -arch ppc -arch i386 -isysroot 
/Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -fno-common -dynamic 
-DNDEBUG -g -O3

compile options: 
'-I/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages
/numpy/core/include 
-I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c'
extra options: '-funroll-all-loops'
gcc-4.0: numexpr/interpreter.c
sh: gcc-4.0: command not found
sh: gcc-4.0: command not found
error: Command "gcc-4.0 -arch ppc -arch i386 -isysroot 
/Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -fno-common -dynamic 
-DNDEBUG -g -O3 
-I/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/
numpy/core/include 
-I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c 
numexpr/interpreter.c -o build/temp.macosx-10.3-fat-2.6/numexpr/interpreter.o 
-funroll-all-loops" failed with exit status 127

What version of the product are you using? On what operating system?
numexpr-1.3.1.tar.gz
numpy 1.4.0
python 2.6
Mac OSX 10.6.4

Please provide any additional information below.

I am really looking forward to using numexpr to support PyTables, but until I 
can get the install to work, I'm dead in the water.  I am not expert at doing 
installs, so probably doing something dumb.  Help greatly appreciated.

Mark Moulton
Sunnyvale, CA

Original issue reported on code.google.com by MarkHMoulton@gmail.com on 31 Jul 2010 at 1:23

GoogleCodeExporter commented 9 years ago
Here is an update of my efforts.

I installed the optional XTools package to get the GCC compiler, which seems to 
have fixed the "gcc-4.0: command not found" error.  I ran "python setup.py 
build" again and encountered a new error message given below.  Afraid I'm 
getting out of my depth here.

Mark 
markhmoulton@gmail.com

Last login: Fri Jul 30 19:09:47 on ttys000
Markm-Mac:~ markhmoulton$ cd /Applications/numexpr-1.3/
Markm-Mac:numexpr-1.3 markhmoulton$ python setup.py build
Warning: Assuming default configuration (numexpr/tests/{setup_tests,setup}.py 
was not found)
Appending numexpr.tests configuration to numexpr
Ignoring attempt to set 'name' (from 'numexpr' to 'numexpr.tests')
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler 
options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler 
options
running build_src
build_src
building py_modules sources
building extension "numexpr.interpreter" sources
build_src: building npy-pkg config files
running build_py
copying build/src.macosx-10.3-fat-2.6/numexpr/__config__.py -> 
build/lib.macosx-10.3-fat-2.6/numexpr
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
building 'numexpr.interpreter' extension
compiling C sources
C compiler: gcc-4.0 -arch ppc -arch i386 -isysroot 
/Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -fno-common -dynamic 
-DNDEBUG -g -O3

compile options: 
'-I/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages
/numpy/core/include 
-I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c'
extra options: '-funroll-all-loops'
gcc-4.0: numexpr/interpreter.c
In file included from 
/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/unicodeobjec
t.h:4In file included from 
/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/unicodeobjec
t.h:4,
                 from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:85,
                 from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:85,
                 from numexpr/interpreter.c:1,
                 from numexpr/interpreter.c:1:
:
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h:4:25:/Developer/SDKs/MacOSX
10.4u.sdk/usr/include/stdarg.h:4:25:  error: error: stdarg.h: No such file or 
directory
stdarg.h: No such file or directory
lipo: can't figure out the architecture type of: 
/var/folders/cM/cMCRW8CBGQm11SoVWKtKCk+++TI/-Tmp-//ccEIKt19.out
In file included from 
/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/unicodeobjec
t.h:4In file included from 
/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/unicodeobjec
t.h:4,
                 from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:85,
                 from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/Python.h:85,
                 from numexpr/interpreter.c:1,
                 from numexpr/interpreter.c:1:
:
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/stdarg.h:4:25:/Developer/SDKs/MacOSX
10.4u.sdk/usr/include/stdarg.h:4:25:  error: error: stdarg.h: No such file or 
directory
stdarg.h: No such file or directory
lipo: can't figure out the architecture type of: 
/var/folders/cM/cMCRW8CBGQm11SoVWKtKCk+++TI/-Tmp-//ccEIKt19.out
error: Command "gcc-4.0 -arch ppc -arch i386 -isysroot 
/Developer/SDKs/MacOSX10.4u.sdk -fno-strict-aliasing -fno-common -dynamic 
-DNDEBUG -g -O3 
-I/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/
numpy/core/include 
-I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c 
numexpr/interpreter.c -o build/temp.macosx-10.3-fat-2.6/numexpr/interpreter.o 
-funroll-all-loops" failed with exit status 1

Original comment by MarkHMoulton@gmail.com on 31 Jul 2010 at 2:18

GoogleCodeExporter commented 9 years ago
Update # 3:

I looked around for a stdarg.h file on my hard drive and found some, and copied 
the most recent (about a year old) into 
Developer/SDKs/MacOSX10.4u.sdk/usr/include/.  I was then able to run python 
setup.py build, followed by python setup.py install, without error.

Unfortunately, when running the recommended test ("import numexpr; 
numexpr.test()") I got the following error.  

Markm-Mac:numexpr-1.3.1 markhmoulton$ python -c "import numexpr; numexpr.test()"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "numexpr/__init__.py", line 14, in <module>
    from __config__ import show as show_config, get_info
ImportError: No module named __config__

The __config__ module does exist --  
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/nu
mexpr-1.3.1-py2.6-macosx-10.3-fat.egg/numexpr/__config__.py.  And I would 
expect Python to find it on its search path.  I haven't figured out yet why it 
does not. 

So I guess my question has reduced to "How can I get the __init__ file in 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/nu
mexpr-1.3.1-py2.6-macosx-10.3-fat.egg/numexpr/ to recognize the __config__ 
module sitting next to it?"

Mark

Original comment by MarkHMoulton@gmail.com on 31 Jul 2010 at 3:43

GoogleCodeExporter commented 9 years ago
That's strange.  Where are you running the tests from?

Can you delete all the directory 
/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/nu
mexpr-1.3.1-py2.6-macosx-10.3-fat.egg, re-compile, and re-install again?  
Please run the test suite from *outside* numexpr sources dir, just in case.

Luck!

Original comment by fal...@gmail.com on 31 Jul 2010 at 10:18

GoogleCodeExporter commented 9 years ago
I really appreciate your getting back to me.  

Looks like the problem is solved.  I didn't delete and re-install.  I just 
changed where I was running the test file from.  The Python docs seemed to say 
that setup.py should be run from inside the unzipped package folder, which I 
had put in the Applications directory in my Mac.  That's where I ran build, 
install, and the "import numexpr; numexpr.test()" commands.  When I instead ran 
it from my usual working python scripts directory, the test ran fine and I am 
now able to import numexpr.  I assume that running the test module from the 
Applications directory is tantamount to running it from inside the package, 
which I gather is not allowed in Python 2.7 and up, though I am pretty confused 
by Python relative/absolute import behavior in packages and probably have it 
wrong.

So to sum up, my Mac install ran into three glitches:  a) a missing gcc 
compiler, which required installing XTools; b) a missing stdarg.h file, which 
required copying another into the requisite folder; c) running from inside the 
Applications directory instead of outside.  I have no idea whether other Mac 
users would encounter similar issues but thought you might like to know.  
Anyway, it runs and I'm in heaven.

Thanks again for responding and for your important software.

Mark

Here is the printout before and after I ran from my Py_Scr directory.  (I added 
the "Yes, this is the test module" comment to the tests/test_numexpr.py module 
as a confirmation.)

Markm-Mac:numexpr-1.3.1 markhmoulton$ python -c "import numexpr; numexpr.test()"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "numexpr/__init__.py", line 14, in <module>
    from __config__ import show as show_config, get_info
ImportError: No module named __config__
Markm-Mac:numexpr-1.3.1 markhmoulton$ cd /Users/markhmoulton/Documents/Py_Scr
Markm-Mac:Py_Scr markhmoulton$ python -c "import numexpr; numexpr.test()"
Yes, this is the test module.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Numexpr version:   1.3.1
NumPy version:     1.4.0
Python version:    2.6.4 (r264:75821M, Oct 27 2009, 19:48:32) 
[GCC 4.0.1 (Apple Inc. build 5493)]
Platform:          darwin-i386
AMD/Intel CPU?     False
VML available?     False
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
................................................................................
................................................................................
...............................<snip>
..................................................
----------------------------------------------------------------------
Ran 5016 tests in 4.176s

OK
Markm-Mac:Py_Scr markhmoulton$

Original comment by MarkHMoulton@gmail.com on 1 Aug 2010 at 6:33

GoogleCodeExporter commented 9 years ago
Yeah, there are always quirks derived from running the test suite right 
straight at the installation directory.  To be frank I don't know why is this, 
but at least your experience could help other users visiting this.

Closing the ticket.

Original comment by fal...@gmail.com on 1 Aug 2010 at 7:06