[Numpy-discussion] 1.8.1rc1 on sourceforge.

Matthew Brett matthew.brett at gmail.com
Mon Mar 10 19:21:32 EDT 2014


Hi,

On Mon, Mar 10, 2014 at 12:37 PM, Chris Barker <chris.barker at noaa.gov> wrote:
> On Mon, Mar 10, 2014 at 10:27 AM, Jens Nielsen <jenshnielsen at gmail.com>
> wrote:
>>
>> If someone is running a brew python and does "pip install numpy"  will pip
>> find a binary wheel that will then not work? That would be bad, but maybe
>> not our problem -- brew users should be using brew to build numpy anyway.
>>
>> No that is not how homebrew works. Brew does not pack anything that pip
>> installable: https://github.com/Homebrew/homebrew/wiki/Homebrew-and-Python
>> so that would be a big issue. Especially since installing numpy with pip
>> and brew python just works without any problem when building from source.
>>
>> There are unofficial brew taps (channels) with python packages but this
>> not the recommended way.
>
>
> OK, then I'll re-phrase:
>
> Brew users should be building from source anyway, even if they use pip to do
> it.
>
> But it would be bad if they had to go out of their way to do that -- I've
> lost track of pip's default behavior in this regard.

We should be fine for homebrew. I believe:

1) The wheels work for homebrew as well
2) Homebrew won't pick them up by default at the moment

Homebrew python has a more specific architecture version then the
python.org python or system python:

$ /usr/local/Cellar/python/2.7.6/bin/python -c "import distutils.util;
print(distutils.util.get_platform())"
macosx-10.9-x86_64

So - for now - pip won't recognize the 10.6_intel wheel as matching
the required 10.9_x86_64 suffix on the wheel (can be solved by
renaming the file as further up the thread).

But - in any case - the wheels work fine in homebrew:

    mkvirtualenv homebrew-2.7 --python=/usr/local/Cellar/python/2.7.6/bin/python
    pip install nose
    # this doesn't see the wheel - because of the platform tag
    # starts to download and install from source
    pip install --pre --find-links . numpy
    # this works
    pip install numpy-1.8.1rc1-cp27-none-macosx_10_6_intel.whl
    # tests all pass
    python -c 'import numpy; numpy.test()'
    # We're picking up the right numpy
    python -c 'import numpy; print(numpy.__file__)'
    deactivate
    # same for 3.3
    mkvirtualenv homebrew-3.3
--python=/usr/local/Cellar/python3/3.3.5/bin/python3
    pip install nose
    python -c 'import numpy'
    pip install --pre --find-links . numpy
    pip install numpy-1.8.1rc1-cp33-cp33m-macosx_10_6_intel.whl
    python -c 'import numpy; numpy.test()'

So I think we're good.  We should surely set up automated testing to
assure ourselves that this is still true, when there's time, it
shouldn't take very long.

Cheers,

Matthew



More information about the NumPy-Discussion mailing list