Skip to content

Instantly share code, notes, and snippets.

@sgillies
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sgillies/508e4a5eb8154ed4afa0 to your computer and use it in GitHub Desktop.
Save sgillies/508e4a5eb8154ed4afa0 to your computer and use it in GitHub Desktop.
Pre-release testing of Rasterio binaries

Rasterio binaries for OS X

Requirements

OS X 10.7+ Python 2.7 (2.7.9 would be best because it includes pip, a package installer)

Get pip if you don't have it

  1. Download https://bootstrap.pypa.io/get-pip.py
  2. Install pip (as admin)
python get-pip.py

Create a virtualenv

So you don't muck up your system python. See http://docs.python-guide.org/en/latest/dev/virtualenvs/.

pip install virtualenv
virtualenv riotest
source riotest/bin/activate

Install Rasterio

Into the virtualenv you activated above.

pip install https://www.dropbox.com/s/x9iksjv4qb2b6ab/rasterio-0.16-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl?dl=1

Test

Here are a couple quick tests.

rio --version

should print "0.16"

rio transform --src_crs EPSG:4326 --dst_crs EPSG:3857 "[-105, 40]"

should print "[-11688546.533293728, 4865942.279503176]"

Finish

deactivate

closes up the virtualenv.

Reporting

If it works, leave a comment with your OS X version, Python version (and whether system, homebrew, macports), and a thumbs up below. If it doesn't work, can you kindly paste the traceback or error along with OS and Python details?

Thank you!

@urschrei
Copy link

urschrei commented Jan 7, 2015

On Yosemite, system Python (2.7.5), using pip 1.4.1:

Installed correctly as a wheel, into the correct virtualenv: it installed rasterio, affine, cligj, enum34, click
Running rio --version from the command line gives me command not found. No idea why this is, since I can run my virtualenv pip fine…
Importing rasterio as rio in an IPython session works as expected, rio.__version__ gives '0.16'

@ludwigb
Copy link

ludwigb commented Jan 7, 2015

On Mavericks (10.9.5), Python 2.7.5 macports, worked with no issues.

@guziy
Copy link

guziy commented Jan 7, 2015

On Yosemite 10.10.1, Python 2.7.8, pip 1.5.6

$ pip install https://www.dropbox.com/s/x9iksjv4qb2b6ab/rasterio-0.16-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl?dl=1
rasterio-0.16-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl is not a supported wheel on this platform.
Storing debug log for failure in /Users/huziy/.pip/pip.log
(py2.7-default)huziy at iMac-de-Administrateur.local in ~/PyNotebooks on master*
$ cat /Users/huziy/.pip/pip.log
------------------------------------------------------------
/Users/huziy/virtualenvs/py2.7-default/bin/pip run on Wed Jan  7 15:02:49 2015
rasterio-0.16-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl is not a supported wheel on this platform.
Exception information:
Traceback (most recent call last):
  File "/Users/huziy/virtualenvs/py2.7-default/lib/python2.7/site-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/Users/huziy/virtualenvs/py2.7-default/lib/python2.7/site-packages/pip/commands/install.py", line 257, in run
    InstallRequirement.from_line(name, None))
  File "/Users/huziy/virtualenvs/py2.7-default/lib/python2.7/site-packages/pip/req.py", line 167, in from_line
    raise UnsupportedWheel("%s is not a supported wheel on this platform." % wheel.filename)
UnsupportedWheel: rasterio-0.16-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl is not a supported wheel on this platform.

@nhv
Copy link

nhv commented Jan 7, 2015

on OSX 10.8.5 Homebrew python 2.7.9

(riotest)NHV-laptop-7:~ nhv$ pip install https://www.dropbox.com/s/x9iksjv4qb2b6ab/rasterio-0.16-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl?dl=1
rasterio-0.16-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl is not a supported wheel on this platform.
Storing debug log for failure in /Users/nhv/.pip/pip.log

NHV-laptop-7:~ nhv$ cat .pip/pip.log

/Users/nhv/riotest/bin/pip run on Wed Jan 7 15:01:42 2015
rasterio-0.16-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl is not a supported wheel on this platform.
Exception information:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/commands/install.py", line 257, in run
InstallRequirement.from_line(name, None))
File "/usr/local/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/req.py", line 167, in from_line
raise UnsupportedWheel("%s is not a supported wheel on this platform." % wheel.filename)
UnsupportedWheel: rasterio-0.16-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl is not a supported wheel on this platform.

(riotest)NHV-laptop-7:~ nhv$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.8.5
BuildVersion: 12F45

(riotest)NHV-laptop-7:~ nhv$ python --version
Python 2.7.9

(riotest)NHV-laptop-7:~ nhv$ virtualenv --version
12.0.5

(riotest)NHV-laptop-7:~ nhv$ pip --version
pip 1.5.6 from /usr/local/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg (python 2.7)

@sgillies
Copy link
Author

sgillies commented Jan 7, 2015

@guziy would you be willing to try pip install https://www.dropbox.com/s/j5cmxm45kj0cb08/rasterio-0.16-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_x86_64.whl?dl=1 for me? I'm still learning to work with the platform tags. As I understand, pip>=6 is more savvy about platform compatibility and would probably take that one in your case without an explicit macosx_10_10_x86_64 tag.

@jhvanderven
Copy link

OSX 10.10.1
Python 2.7.8
Works like a charm

@sgillies
Copy link
Author

sgillies commented Jan 7, 2015

@nhv i added a macosx_10_8_x86_64 for you... could you try pip install https://www.dropbox.com/s/9qzi24w7gfejl6m/rasterio-0.16-cp27-none-macosx_10_6_intel.macosx_10_8_x86_64.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_x86_64.whl?dl=1 for me?

@sgillies
Copy link
Author

sgillies commented Jan 7, 2015

Ugh, I forgot that there are no gist notifications. I'll follow up in rasterio/rasterio#238.

@nhv
Copy link

nhv commented Jan 7, 2015

(riotest)NHV-laptop-7:~ nhv$ rio --version
Traceback (most recent call last):
File "/Users/nhv/riotest/bin/rio", line 7, in
from rasterio.rio.main import cli
File "/Users/nhv/riotest/lib/python2.7/site-packages/rasterio/init.py", line 8, in
from rasterio._base import eval_window, window_shape, window_index
ImportError: dlopen(/Users/nhv/riotest/lib/python2.7/site-packages/rasterio/_base.so, 2): Symbol not found: ___sincos_stret
Referenced from: /Users/nhv/riotest/lib/python2.7/site-packages/rasterio/.dylibs/libproj.0.dylib
Expected in: /usr/lib/libSystem.B.dylib
in /Users/nhv/riotest/lib/python2.7/site-packages/rasterio/.dylibs/libproj.0.dylib

Stack Overflow has a hint
http://stackoverflow.com/questions/25926495/symbol-not-found-sincos-stret

In examining the declarations of the various sincos functions in /usr/include/math.h on my OS X 10.9 system, they are all marked as __OSX_AVAILABLE_STARTING(__MAC_10_9, __IPHONE_NA), meaning they wouldn't be available on your 10.8 system. So my guess would be that the version of root you're using is compiled against OS X 10.9. –

@HyperJohnGraham
Copy link

OSX 10.10.1 (14B25)
Python 2.7.6 (default, Sep 9 2014, 15:04:36)
Worked perfect!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment