3

I have Anaconda running with Python 2.7.10 on Mac OSX 10.9.5. I'm trying to install a package called "Fiona".

I entered:

sudo pip install Fiona-1.6.0-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.ma‌​cosx_10_10_intel.macosx_10_10_x86_64.whl 

Result:

The directory '/Users/ronaldbjork/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Fiona-1.6.0-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.mac‌​osx_10_10_intel.macosx_10_10_x86_64.whl **is not a supported wheel on this platform.**

It was suggest that -H be used:

So I entered:

sudo -H pip install Fiona-1.6.0-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.ma‌​cosx_10_10_intel.macosx_10_10_x86_64.whl 

Result:

Fiona-1.6.0-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.mac‌​osx_10_10_intel.macosx_10_10_x86_64.whl **is not a supported wheel on this platform**

2 Answers 2

5

Python wheels is a way to distribute binary packages.

How that works is that the maintainer of a project compiles the project (usually with C extensions and such) on each of the supported platforms (e.g. Windows, Mac, linux, etc) and then ships the package directly with the compiled binary code.

The advantage is that the when installing the package, as long as the wheel was compiled on the same platform, all installation needs to do is simply unpack a tar file and whala, package is installed. Pretty cool. This especially has dramatic effects on rather big packages with lots of C code such as numpy:

(test) ❯❯❯ time pip install numpy
Collecting numpy
  Using cached numpy-1.9.2-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl
Installing collected packages: numpy
Successfully installed numpy-1.9.2
        2.50 real         1.37 user         0.38 sys

As you can see, numpy installed in 2.5 seconds!!! If you ever installed it from source, this is pretty crazy and awesome!

Anyway, back to your problem. So the reason you are getting ... is not a supported wheel on this platform is because the package you are installing was not compiled on the same platform as you are installing it on therefore you cannot install from wheel and need to install from source which will compile the code at installation time.

As long as you have a pretty recent pip, you should be able to simply do:

pip install Fiona==1.6.0

which will then use a wheel if it can, or install from source if wheel cannot be used.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks. This works. I believe I had originally used conda for installation and GeoPanda had a problem with Fiona. I originally posted at "Geographic Information Systems" section of StackExchange. There I was told to use a wheel installation: gis.stackexchange.com/questions/155424/… I posted here since the problem had a larger or different scope than GIS.
0

Why bother with the wheel package. You said you have the Anaconda distribution of python and a quick look at the included packages shows that Fiona is already there. You can simply:

conda install fiona

This allows the conda installer to manage all of the binary dependencies. Also makes it easier to upgrade. You could also see a more complete listing of versions already available to you with conda search fiona or look into packages available on anaconda.org(formerly known as binstar.org).

EDIT: I see from your comment above that this was related to a compatibility issue with GeoPandas. Although not a part of Anaconda, A quick search shows a number of contributed packages on anaconda.org including this one from IOOS contributions

conda install -c https://conda.anaconda.org/ioos geopandas

Bottom line: once you have Anaconda installed, I'd say always try for the conda install and search anaconda.org first before trying pip.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.