Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7920437
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:13:10+00:00 2026-06-03T16:13:10+00:00

I have been trying for months to get numpy installed for Python 3 but

  • 0

I have been trying for months to get numpy installed for Python 3 but despite copious amounts of Googling and even posting to the numpy mailing list I am still no closer to a solution.

I have managed to get it installed via MacPorts but unfortunately there doesn’t appear to be a port of MatPlotLib for Python 3 which is the main reason I am trying to install numpy…so I am a bit stuck…

I keep getting the same error whilst trying to build from the setup.py file. I have included the terminal output below.

Thanks for any help you can offer,

Adam.

Here is the terminal output:

lipo: can't figure out the architecture type of: /var/folders/zj/7xymy_2n3s71ws30v3v_qnlw0000gn/T//ccbRr0Hj.out
failure.
removing: _configtest.c _configtest.o
Running from numpy source directory.Traceback (most recent call last):
  File "setup.py", line 214, in <module>
    setup_package()
  File "setup.py", line 207, in setup_package
    configuration=configuration )
  File "/Users/adammcnicol/Downloads/numpy-1.6.2rc1/build/py3k/numpy/distutils/core.py", line 186, in setup
    return old_setup(**new_attr)
  File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/dist.py", line 917, in run_commands
    self.run_command(cmd)
  File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/dist.py", line 936, in run_command
    cmd_obj.run()
  File "/Users/adammcnicol/Downloads/numpy-1.6.2rc1/build/py3k/numpy/distutils/command/build.py", line 37, in run
    old_build.run(self)
  File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/command/build.py", line 126, in run
    self.run_command(cmd_name)
  File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/distutils/dist.py", line 936, in run_command
    cmd_obj.run()
  File "/Users/adammcnicol/Downloads/numpy-1.6.2rc1/build/py3k/numpy/distutils/command/build_src.py", line 152, in run
    self.build_sources()
  File "/Users/adammcnicol/Downloads/numpy-1.6.2rc1/build/py3k/numpy/distutils/command/build_src.py", line 169, in build_sources
    self.build_extension_sources(ext)
  File "/Users/adammcnicol/Downloads/numpy-1.6.2rc1/build/py3k/numpy/distutils/command/build_src.py", line 328, in build_extension_sources
    sources = self.generate_sources(sources, ext)
  File "/Users/adammcnicol/Downloads/numpy-1.6.2rc1/build/py3k/numpy/distutils/command/build_src.py", line 385, in generate_sources
    source = func(extension, build_dir)
  File "numpy/core/setup.py", line 410, in generate_config_h
    moredefs, ignored = cocache.check_types(config_cmd, ext, build_dir)
  File "numpy/core/setup.py", line 41, in check_types
    out = check_types(*a, **kw)
  File "numpy/core/setup.py", line 271, in check_types
    "Cannot compile 'Python.h'. Perhaps you need to "\
SystemError: Cannot compile 'Python.h'. Perhaps you need to install python-dev|python-devel.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T16:13:13+00:00Added an answer on June 3, 2026 at 4:13 pm

    Well, I finally managed to get NumPy to install. Not sure it is the best method but it seems to work!

    First of all i needed to install distribute:

    1. curl http://python-distribute.org/distribute_setup.py | python3

    Then I installed pip:

    1. curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python3

    After that I had to get pip on to my system path (again there are probably better ways):

    1. Open Terminal
    2. Type the following (single line):
      • sudo ln -s /Library/Frameworks/Python.framework/Versions/3.2/bin/pip /usr/local/bin

    With distribute and pip installed I then installed Nose, which NumPy needs for testing or something:

    1. Again, in Terminal type the following:
      • pip install nose

    Now I needed to make sure I had the latest version of Xcode:

    1. From the AppStore install the latest version of Xcode
    2. If you still have a /Developer folder then rename it Developer-old (not sure whether this will cause problems for me later or not)
    3. Open Terminal and create a symlink to the AppStore version of Xcode (single line):
      • sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer /Developer

    With all of that out of the way time to install NumPy:

    1. Download the NumPy source from: http://sourceforge.net/projects/numpy/files/NumPy/1.6.2rc1/
    2. Unarchive the file
    3. Open Terminal again:
      • cd into the directory created by unarchiving the file e.g.
        • cd /Users/username/Downloads/numpy-1.6.2rc1
    4. Type into the Terminal the following to change the complier used to build NumPy:
      • export CC=clang
      • export CXX=clang
      • export FFLAGS=-ff2c
      • export LDSHARED='clang -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.6.sdk -g' (this is a single line)
      • python3 setup.py build (this may take a while)
      • python3 setup.py install

    Okay, assuming there were no errors NumPy should be installed. Time to test it out:

    1. Open IDLE
    2. In the Python Shell type:
      • import numpy
      • numpy.test('full')
    3. This will test NumPy the final result I received with Python 3.2.3 was:
      • <nose.result.TextTestResult run=3192 errors=0 failures=1>

    So the NumPy installation passes all except one test, which seems pretty good. I haven’t had a chance to see if works properly yet as I am still struggling to get matplotlib installed…

    Hope these instructions are useful to somebody!

    Adam.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to get a simple spider to run with scrapy, but
So, I have been trying to fix this for about two months. It all
I have been trying to get a response from a server sending a GET
I have been trying this for a while but thus far haven't had any
I have been trying to do this for months, and months, and months, and
I've been trying on and off for the past 6 months to get OpenCV
I have been working in Python for a few months now, and it has
Coming from web development I have been trying to get familiar with compiled programming,
We have been trying to get git-subtree working on a project (with git version
I have been developing under Python/Snowleopard happily for the part 6 months. I just

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.