megbedell / wobble

precise data-driven RV fitting, now with tellurics!
https://wobble.readthedocs.io
MIT License
39 stars 16 forks source link

Installation Issues #71

Open caganze opened 5 years ago

caganze commented 5 years ago

Hi,

I'm having issues with the installation. I cloned the repository then ran the script python setup.py develop Python version: 3.6 Tensorflow version:1.10.0 OS version: Mojave I get the following error:

anaconda3/envs/wobblenv/lib/python3.6/site-packages/tensorflow -ltensorflow_framework clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated] ld: library not found for -lstdc++ clang: error: linker command failed with exit code 1 (use -v to see invocation) error: command 'g++' failed with exit status 1

Otherwise, everything runs fine in google collab

dfm commented 5 years ago

To get this to work, you can edit the setup.py file, specifically lines 16-35 to have the flags that you need (and removing the ones that you don't need). Try playing around with that and if you get something that works, let us know!

caganze commented 5 years ago

I'm not sure if I'm supposed to do this, but I changed the language to C and both the installation and first notebook example work

Here is the exact change

import tensorflow as tf
compile_flags = tf.sysconfig.get_compile_flags()
link_flags = tf.sysconfig.get_link_flags()
compile_flags += ["-std=c++11"]
if sys.platform == "darwin":
   compile_flags += ["-mmacosx-version-min=10.14"]

extensions = [
        Extension(
            "wobble.interp.interp_op",
            sources=[
                "wobble/interp/interp_op.cc",
                "wobble/interp/interp_rev_op.cc",
            ],
            include_dirs=["wobble/interp"],
            language="c",
            extra_compile_args=compile_flags,
            extra_link_args=link_flags,
        ),
    ]```
dfm commented 5 years ago

Great. Thanks for the update and I'm glad to hear that you got something that worked!

I expect that the language argument wasn't needed - probably just the earlier changes - but it's all good either way!