New issue 1138: Cannot install yt https://bitbucket.org/yt_analysis/yt/issues/1138/cannot-install-yt Erik Schnetter: I am trying to install yt onto OS X El Capitan. First I tried MacPorts, but this didn't work because of a problem with py27-h5py (I filed a MacPorts bug report for this). I then tried installing yt via pip; this apparently worked, but when I try to use it, there is an error: ``` $ python Python 2.7.10 (default, Oct 1 2015, 12:52:17) [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.72)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import yt Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/eschnett/src/yt/yt/__init__.py", line 116, in <module> from yt.data_objects.api import \ File "/Users/eschnett/src/yt/yt/data_objects/api.py", line 22, in <module> from .static_output import \ File "/Users/eschnett/src/yt/yt/data_objects/static_output.py", line 54, in <module> from yt.geometry.spherical_coordinates import \ File "/Users/eschnett/src/yt/yt/geometry/spherical_coordinates.py", line 23, in <module> from yt.utilities.lib.misc_utilities import \ ImportError: cannot import name pixelize_aitoff
Next I tried installing it via `install_script.sh`:
env HDF5_DIR=/opt/local bash install_script.sh ======================================================================== Hi there! This is the yt installation script. We're going to download some stuff and install it to create a self-contained, isolated environment for yt to run within. Inside the installation script you can set a few variables. Here's what they're currently set to -- you can hit Ctrl-C and edit the values in the script if you aren't such a fan. INST_ZLIB = 1 so I will be installing zlib INST_BZLIB = 1 so I will be installing bzlib INST_PNG = 1 so I will be installing libpng INST_FTYPE = 1 so I will be installing freetype2 INST_SQLITE3 = 1 so I will be installing SQLite3 INST_PY3 = 0 so I won't be installing Python 3 INST_HG = 1 so I will be installing Mercurial INST_PYX = 0 so I won't be installing PyX INST_SCIPY = 0 so I won't be installing scipy INST_0MQ = 1 so I will be installing ZeroMQ INST_ROCKSTAR = 0 so I won't be installing Rockstar HDF5_DIR=/opt/local , so I will not be installing HDF5 Installation will be to /Users/eschnett/yt-x86_64 and I'll be logging the installation in /Users/eschnett/yt-x86_64/yt_install.log I think that about wraps it up. If you want to continue, hit enter. If you'd rather stop, maybe think things over, even grab a sandwich, hit Ctrl-C. Looks like you're running on Mac OSX. NOTE: you must have the Xcode command line tools installed. The instructions for obtaining these tools varies according to your exact OS version. On older versions of OS X, you must register for an account on the apple developer tools website: https://developer.apple.com/downloads to obtain the download link. We have gathered some additional instructions for each version of OS X below. If you have trouble installing yt after following these instructions, don't hesitate to contact the yt user's e-mail list. You can see which version of OSX you are running by clicking 'About This Mac' in the apple menu on the left hand side of menu bar. We're assuming that you've installed all operating system updates; if you have an older version, we suggest running software update and installing all available updates. OS X 10.5.8: search for and download Xcode 3.1.4 from the Apple developer tools website. OS X 10.6.8: search for and download Xcode 3.2 from the Apple developer tools website. You can either download the Xcode 3.2.2 Developer Tools package (744 MB) and then use Software Update to update to XCode 3.2.6 or alternatively, you can download the Xcode 3.2.6/iOS SDK bundle (4.1 GB). OS X 10.7.5: download Xcode 4.2 from the mac app store (search for Xcode). Alternatively, download the Xcode command line tools from the Apple developer tools website. OS X 10.8.4, 10.9, and 10.10: download the appropriate version of Xcode from the mac app store (search for Xcode). Additionally, you will have to manually install the Xcode command line tools. For OS X 10.8, see: http://stackoverflow.com/questions/9353444 For OS X 10.9 and 10.10, the command line tools can be installed with the following command: xcode-select --install ======================================================================== Awesome! Here we go. Using wget Using shasum -a 512 Installing PNG Installing FreeType2 Installing SQLite3 Installing Python 2. This may take a while, but don't worry. yt loves you. ******************************************** FAILURE REPORT: ******************************************** from /System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h:9, from /System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h:11, from /System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:35, from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:24, from Include/pymactoolbox.h:10, from Python/mactoolboxglue.c:27: /System/Library/Frameworks/CoreGraphics.framework/Headers/CGFont.h:53:40: error: initializer element is not constant static const CGFontIndex kCGGlyphMax = kCGFontIndexMax; ^ make: *** [Python/mactoolboxglue.o] Error 1 ******************************************** ******************************************** Failure. Check /Users/eschnett/yt-x86_64/yt_install.log. The last 10 lines are above. ``` I'd be grateful for any pointers.