megbedell / wobble

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

TF issues #28

Open timothydmorton opened 6 years ago

timothydmorton commented 6 years ago

Hey @dfm I'm trying to install this and I'm getting various TF-related issues.

First is with just using pip install tensorflow which gives me v1.11, but then I can't import it:

ImportError: Traceback (most recent call last):
  File "/Users/tdm/miniconda3/envs/wobble/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/Users/tdm/miniconda3/envs/wobble/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/Users/tdm/miniconda3/envs/wobble/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
  File "/Users/tdm/miniconda3/envs/wobble/lib/python3.6/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/Users/tdm/miniconda3/envs/wobble/lib/python3.6/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: dlopen(/Users/tdm/miniconda3/envs/wobble/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so, 6): Symbol not found: _clock_gettime
  Referenced from: /Users/tdm/miniconda3/envs/wobble/lib/python3.6/site-packages/tensorflow/python/../libtensorflow_framework.so (which was built for Mac OS X 10.12)
  Expected in: /usr/lib/libSystem.B.dylib
 in /Users/tdm/miniconda3/envs/wobble/lib/python3.6/site-packages/tensorflow/python/../libtensorflow_framework.so

Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/install_sources#common_installation_problems

for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.

After poking around a bit, I saw that some people had fewer issues with tf v1.9, which I then installed and could import correctly, but then it looks like your model doesn't work (don't know if this is a problem with v1.9 or some other problem):

In [1]: import wobble
---------------------------------------------------------------------------
NotFoundError                             Traceback (most recent call last)
<ipython-input-1-1c811ac859b5> in <module>()
----> 1 import wobble

/Users/tdm/repositories/wobble/wobble/__init__.py in <module>()
      1 name = "wobble"
      2 from .utils import get_session, doppler
----> 3 from .interp import interp
      4 from .data import Data
      5 from .results import Results

/Users/tdm/repositories/wobble/wobble/interp/__init__.py in <module>()
      8 from ..tf_utils import load_op_library
      9
---> 10 mod = load_op_library(__file__, "interp_op")
     11 # searchsorted = mod.searchsorted
     12

/Users/tdm/repositories/wobble/wobble/tf_utils.py in load_op_library(module_file, name)
     18     else:
     19         libfile += ".so"
---> 20     return tf.load_op_library(libfile)

/Users/tdm/miniconda3/envs/wobble/lib/python3.6/site-packages/tensorflow/python/framework/load_library.py in load_op_library(library_filename)
     54     RuntimeError: when unable to load the library or get the python wrappers.
     55   """
---> 56   lib_handle = py_tf.TF_LoadLibrary(library_filename)
     57
     58   op_list_str = py_tf.TF_GetOpList(lib_handle)

NotFoundError: dlopen(/Users/tdm/repositories/wobble/wobble/interp/interp_op.cpython-36m-darwin.so, 6): Symbol not found: __ZN10tensorflow5ShardEiPNS_6thread10ThreadPoolExxSt8functionIFvxxEE
  Referenced from: /Users/tdm/repositories/wobble/wobble/interp/interp_op.cpython-36m-darwin.so
  Expected in: flat namespace
 in /Users/tdm/repositories/wobble/wobble/interp/interp_op.cpython-36m-darwin.so

I did python setup.py develop for wobble. Is there any other build step I need? Any other pointers? Do I need Mac OS 10.12?

dfm commented 6 years ago

For the first one: make sure that you're using the most recent release of pip.

For the second: does rm -rf build; python setup.py develop help? Do you get any errors when compiling?

@megbedell: what version of TF are you on?

megbedell commented 6 years ago

I'm using TF 1.10.0