SiLab-Bonn / pylandau

Simple Landau distribution definitions to be used in Python.
GNU Lesser General Public License v2.1
20 stars 5 forks source link

MacOS 10.14 (Mojave) installation hassle #15

Open laborleben opened 5 years ago

laborleben commented 5 years ago

I'll leave this here until documentation is added or setup.py is modified:

Install Xcode via App Store Afterwards, install Command Line Tools and header files. For that, launch Terminal and run

xcode-select --install
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

Afterwards use the following commands to properly install pyLandau:

export MACOSX_DEPLOYMENT_TARGET=10.14

and then (LLVM on macOS no longer supports libstdc++)

CFLAGS='-stdlib=libc++' pip install .

or for developers

CFLAGS='-stdlib=libc++' pip install -e .

The installation was successfully carried out on MacOS 10.14.5 (Mojave) with Anaconda Python and having the required packages installed.

References:

  1. https://github.com/cython/cython/issues/2694
  2. https://stackoverflow.com/questions/52509602/cant-compile-c-program-on-a-mac-after-upgrade-to-mojave
laborleben commented 5 years ago

I uploaded py27 & py37 wheels for macOS.