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 9232039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:13:07+00:00 2026-06-18T06:13:07+00:00

Despite the many stories that I’ve heard about people having problems installing numpy, scipy,

  • 0

Despite the many stories that I’ve heard about people having problems installing numpy, scipy, and matplotlib on Mac OS X Lion, I’ve never had any problem until today. I recently updated my system and attempted to install the latest versions of NumPy and SciPy. The NumPy installation went fine and the test ran as expected, however the scipy installation seems to be incomplete. Every time I try to import scipy.stats I get the following error:

In [1]: import scipy.stats
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-b66176eb2d0a> in <module>()
----> 1 import scipy.stats

    /Library/Python/2.7/site-packages/scipy/stats/__init__.py in <module>()
    326 """
    327 
--> 328 from stats import *
    329 from distributions import *
    330 from rv import *

/Library/Python/2.7/site-packages/scipy/stats/stats.py in <module>()
    191 # Scipy imports.
    192 from numpy import array, asarray, dot, ma, zeros, sum
--> 193 import scipy.special as special
    194 import scipy.linalg as linalg
    195 import numpy as np

/Library/Python/2.7/site-packages/scipy/special/__init__.py in <module>()
    525 """
    526 
--> 527 from _ufuncs import *
    528 from _ufuncs_cxx import *
    529 

ImportError: dlopen(/Library/Python/2.7/site-packages/scipy/special/_ufuncs.so, 2): no     suitable image found.  Did find:
    /Library/Python/2.7/site-packages/scipy/special/_ufuncs.so: mach-o, but wrong   architecture

I am using the latest version of numpy and scipy off of github. For some reason it looks like the x86_64 version of the _ufuncs.so isn’t being built. I’ve tried every compiler flag I can think of
ARCHFLAGS=”-arch i386 -arch x86_64″
LDFLAGS=”-arch i386 -arch x86_64″
FFLAGS=”-m64 -ff2c”

and no mater what I do I get the same error. Any advice?

UPDATE
So I think that I’ve found the problem, I will follow-up on the scipy distribution list:

Most of the libraries created when scipy builds are universal files meaning that they support both i386 and x86_64. The problem is that the files compiled with gfortran are compiled as i386 only.

> find . -name *.so | xargs -I {} lipo -info {}
Architectures in the fat file: ./build/lib.macosx-10.7-intel-2.7/scipy/cluster/_hierarchy_wrap.so are: i386 x86_64 
Architectures in the fat file: ./build/lib.macosx-10.7-intel-2.7/scipy/cluster/_vq.so are: i386 x86_64 
Non-fat file: ./build/lib.macosx-10.7-intel-2.7/scipy/fftpack/_fftpack.so is architecture: i386

I’ve checked my environment and I don’t see anything suspicious. As specified on the SciPy Mac OS X page. I only export:
CC=gcc-4.2
CXX=g++-4.2
FFLAGS=-ff2c

I just did install on another system and everything worked just fine.

  • 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-18T06:13:08+00:00Added an answer on June 18, 2026 at 6:13 am

    In the end I wound up removing all of my GNU compilers C, C++, and GFortran. And then reinstalling the 2.5.1 versions. I then set the environment variables:

    CC=gcc-4.2
    CXX=g++-4.2 
    FFLAGS=-ff2c
    ARCHFLAGS="-arch i386 -arch x86_64"
    

    After that I built Scipy and voila! The universal binaries appeared:

    [16:29:27] junebug:fftpack> lipo -info _fftpack.so 
    Architectures in the fat file: _fftpack.so are: i386 x86_64
    

    I am not sure what was wrong with the paths to my GNU compilers, but I think the problem may have been because I had multiple versions installed.

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

Sidebar

Related Questions

Newbie question about JavaFX that I haven't been able to answer, despite knowing it
despite many tries I can't get the result that I would like to see
Many array methods return a single index despite the fact that the array is
Despite substantial research and many posts that seem to indicate this isn't too tough,
I know many people have asked, this question, but despite hardcoding the path to
Despite the many threads on that topic, I am still unclear as to when
Despite I have been using MVC in PHP many times, I found out that
Despite me working with C# ( Windows Forms ) for years, I'm having a
Despite working on EE for about 3 weeks now, believe it or not, this
I have a piece of code here that does not work despite me using

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.