Sean Gillies (Posts about macosx)https://sgillies.net/tags/macosx.atom2023-12-31T01:26:18ZSean GilliesNikolaTrued Macosx Wheelshttps://sgillies.net/2017/10/31/trued-macosx-wheels.html2017-10-31T08:02:48-06:002017-10-31T08:02:48-06:00Sean Gillies<p>I've woken up from my <a class="reference external" href="https://sgillies.net/2017/10/27/wobbly-fiona-and-shapely-wheels.html">Nightmare on C++ Street</a> and have uploaded new
Rasterio, Fiona, and Shapely macosx wheels to PyPI. Use the pip requirement
specs below to get the latest and greatest compatible wheels.</p>
<ul class="simple">
<li><p><code class="docutils literal"><span class="pre">rasterio==1.0a11</span></code></p></li>
<li><p><code class="docutils literal"><span class="pre">fiona==1.7.10.post1</span></code></p></li>
<li><p><code class="docutils literal"><span class="pre">shapely==1.6.2.post1</span></code></p></li>
</ul>
<p>My Xcode command line tools were out of sync with my libraries, libc++abi.dylib
in particular. In the Xcode preferences there's an option to select versions
of the command line tools. On my home computer, I've got Xcode 7.2.1 and have
selected version 7.2.1 of the command line tools.</p>
<figure>
<img alt="https://c1.staticflickr.com/5/4476/38033571472_85c109ff96_b.jpg" src="https://c1.staticflickr.com/5/4476/38033571472_85c109ff96_b.jpg">
</figure>
<p>On my work computer, where I've been building the wheels, I somehow ended up
with Xcode 8.2.1 and version 9.0.0 of the command line tools. I've never even
seen this preference before, but do remember accepting a command line tools
upgrade from Apple's App Store a while back. Reverting to command line tools
version 8.2.1 cleared up the segmentation faults reported and studied in
<a class="reference external" href="https://github.com/sgillies/frs-wheel-builds/issues/20">https://github.com/sgillies/frs-wheel-builds/issues/20</a>.</p>
<p>I hope this blog post finds the next person to trip over this Xcode and command
line tools mis-configuration.</p>
<p>Now I'm going to go back into PyPI and remove the broken binary wheels for
older versions, leaving only the source distributions.</p>Wobbly Fiona and Shapely Wheelshttps://sgillies.net/2017/10/27/wobbly-fiona-and-shapely-wheels.html2017-10-27T12:54:47-06:002017-10-27T12:54:47-06:00Sean Gillies<p>On 2017-06-05 <a class="reference external" href="https://github.com/sgillies/frs-wheel-builds/blob/master/CHANGES.txt#L18-L28">I began to use GDAL 2.2.0</a>
in the Fiona binary wheels I upload to the Cheeseshop. I also changed the
<code class="docutils literal">MACOSX_DEPLOYMENT_TARGET</code> environment variable from 10.6 to 10.9 in order to
get GDAL 2.2.0 to compile. This seems to be the cause of Shapely and Fiona
wheel compatibility issues. Have I mentioned that I'm not completely competent
at C++ on OS X? I'm not.</p>
<p>My co-worker Matt Perry provided a script that exposed this issue clearly and
I bisected in Fiona and Shapely version space until I found the root of the
problem.</p>
<p>Until I get new wheels on PyPI, here are the three coping strategies.</p>
<ol class="arabic simple">
<li><p>Avoid the wheels entirely:</p></li>
</ol>
<div class="code"><pre class="code console"><a id="rest_code_43f0295f01334b49897e870e65f33141-1" name="rest_code_43f0295f01334b49897e870e65f33141-1" href="https://sgillies.net/2017/10/27/wobbly-fiona-and-shapely-wheels.html#rest_code_43f0295f01334b49897e870e65f33141-1"></a><span class="go">pip install -I --no-binary fiona,shapely fiona==1.7.10 shapely==1.6.2</span>
</pre></div>
<p>This is what I do in my Dockerfiles at work. This strategy requires the GDAL
and GEOS libraries and headers to be pre-installed on your system, and also
Numpy and Cython.</p>
<ol class="arabic simple" start="2">
<li><p>Downgrade Fiona, using wheels:</p></li>
</ol>
<div class="code"><pre class="code console"><a id="rest_code_6d0fcd4d3d67456992033ae8555d01d7-1" name="rest_code_6d0fcd4d3d67456992033ae8555d01d7-1" href="https://sgillies.net/2017/10/27/wobbly-fiona-and-shapely-wheels.html#rest_code_6d0fcd4d3d67456992033ae8555d01d7-1"></a><span class="go">pip install -I fiona==1.7.6</span>
</pre></div>
<ol class="arabic simple" start="3">
<li><p>Downgrade Shapely, using wheels:</p></li>
</ol>
<div class="code"><pre class="code console"><a id="rest_code_48f9e3f165744eee91a1feebc927ea41-1" name="rest_code_48f9e3f165744eee91a1feebc927ea41-1" href="https://sgillies.net/2017/10/27/wobbly-fiona-and-shapely-wheels.html#rest_code_48f9e3f165744eee91a1feebc927ea41-1"></a><span class="go">pip install -I shapely==1.6b4</span>
</pre></div>
<p>The issue affects Rasterio, too. Rasterio version 1.0a9 wheels should be safe
with any version of Shapely.</p>
<p>I'll have an announcement about new wheels soon.</p>
<p><strong>Update</strong> (2017-10-31): the nightmare is <a class="reference external" href="https://sgillies.net/2017/10/31/trued-macosx-wheels.html">over</a>.</p>