Code Monkey home page Code Monkey logo

Comments (5)

FrancescAlted avatar FrancescAlted commented on May 30, 2024

From [email protected] on July 30, 2010 19:18:10

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
[email protected]

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/unicodeobject.h:4In file included from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/unicodeobject.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/MacOSX10.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/unicodeobject.h:4In file included from /Library/Frameworks/Python.framework/Versions/2.6/include/python2.6/unicodeobject.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/MacOSX10.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

from numexpr.

FrancescAlted avatar FrancescAlted commented on May 30, 2024

From [email protected] on July 30, 2010 20:43:44

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 "", line 1, in
File "numexpr/init.py", line 14, in
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/numexpr-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/numexpr-1.3.1-py2.6-macosx-10.3-fat.egg/numexpr/ to recognize the config module sitting next to it?"

Mark

from numexpr.

FrancescAlted avatar FrancescAlted commented on May 30, 2024

From [email protected] on July 31, 2010 03:18:17

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/numexpr-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!

from numexpr.

FrancescAlted avatar FrancescAlted commented on May 30, 2024

From [email protected] on July 31, 2010 23:33:18

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 "", line 1, in
File "numexpr/init.py", line 14, in
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
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
...............................................................................................................................................................................................

..................................................

Ran 5016 tests in 4.176s

OK
Markm-Mac:Py_Scr markhmoulton$

from numexpr.

FrancescAlted avatar FrancescAlted commented on May 30, 2024

From [email protected] on August 01, 2010 00:06:37

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.

Status: Done

from numexpr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.