-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installing Pandana in MacOS 10.15 Catalina #129
Comments
Same issue here. My local solution was:
I think enforcing |
@martjanz Thanks, this is a good point. On my machine it looks like the
This would give people the flexibility to use whatever compiler they want, if they set the environment variable before running Also, do you know if setting More to-dos:
|
Hello, Thank you, I've suceeded to install with your helpful information (I followed @martjanz 's method). https://github.com/UDST/pandana/blob/master/setup.py#L65 # os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.9'
os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.14' |
Adding to this thread.. I needed to install an older version of Pandana on my Mac that's running Catalina, and had a lot of trouble. The pip binaries for Pandana 0.3 won't install, and the build scripts don't work either. We should probably look into this a little more, and put out a maintenance update for Pandana 0.3 as well. A lot of people still use it.
What eventually worked for me was to add these arguments to the MacOS build logic in setup.py#L87 of v0.3, mirroring updates that we made in v0.4: os.environ['CC'] = 'clang --sysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'
extra_compile_args += ['-D NO_TR1_MEMORY', '-stdlib=libc++']
extra_link_args += ['-stdlib=libc++'] This StackOverflow answer explains why the I still don't feel like I have a complete understanding of what's going on, like why the older binaries don't work anymore. And @cvanoli reported similar problems in MacOS 10.14 Mojave recently, so these changes may not be tied strictly to the OS version. |
PR #137 resolves this in the dev build of Pandana, to be released on pip/conda soon. I feel like it's probably not worth going back and patching earlier versions so they can compile in MacOS 10.15 Catalina. But I'll leave this issue open and we can revisit if needed. |
@smmaurer is there any update to when it will be released on pip/conda? Or advice on how to install the package on MacOS 10.15 without the technical capabilities to compile locally? |
Hi @zippau, this should be released next week! But I think only |
Here are some tips for installing Pandana in MacOS 10.15 Catalina.
Existing installation instructions: http://udst.github.io/pandana/installation.html
Conda
conda install pandana
worked for me.Pip / local compilation
You need to reinstall Command Line Tools, even if you had them before updating to Catalina:
xcode-select --install
Single-threaded (using built-in compiler)
This is failing for me. The conditional in setup.py#L72 is always evaluating to True because of whitespace in the string from the OS, so the
-fopenmp
flag is added when it shouldn't be.The fix is to use
os.popen('which clang').read().strip()
. This lets single-threaded installation succeed on my machine.Multi-threaded (using Conda toolchain)
The C++ header files are in a new location in Catalina. We don't have to install them separately any more, but we do have to make sure the compilation toolchain can see them.
What eventually worked for me was to replace
'clang'
in setup.py#L73 with the following:'clang --sysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'
Fixes for next release
--sysroot
argument in setup.py#L73The text was updated successfully, but these errors were encountered: