title: python3.5 import tensorflow.contrib error: Function has keyword-only arguments or annotations, use getfullargspec() API which can support them
body: <p>I am using python 3.5 and installed tensorflow-gpu 1.12.0 on Linux. When I run this in python3.5:</p>
  
  <pre><code>import tensorflow as tf
  </code></pre>
  
  <p>It works fine with no errors.</p>
  
  <p>However, when I run:</p>
  
  <pre><code>import tensorflow.contrib
  </code></pre>
  
  <p>There is an error:</p>
  
  <pre><code>Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  File "/home/myname/anaconda3/lib/python3.5/site-packages/tensorflow/contrib/__init__.py", line 49, in &lt;module&gt;
      from tensorflow.contrib import distributions
  File "/home/myname/anaconda3/lib/python3.5/site-packages/tensorflow/contrib/distributions/__init__.py", line 38, in &lt;module&gt;
  from tensorflow.contrib.distributions.python.ops.estimator import *
       File "/home/myname/anaconda3/lib/python3.5/site-packages/tensorflow/contrib/distributions/python/ops/estimator.py", line 21, in &lt;module&gt;
      from tensorflow.contrib.learn.python.learn.estimators.head import _compute_weighted_loss
    File "/home/myname/anaconda3/lib/python3.5/site-packages/tensorflow/contrib/learn/__init__.py", line 96, in &lt;module&gt;
      from tensorflow.contrib.learn.python.learn import *
    File "/home/myname/anaconda3/lib/python3.5/site-packages/tensorflow/contrib/learn/python/__init__.py", line 28, in &lt;module&gt;
      from tensorflow.contrib.learn.python.learn import *
    File "/home/myname/anaconda3/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/__init__.py", line 30, in &lt;module&gt;
      from tensorflow.contrib.learn.python.learn import estimators
    File "/home/myname/anaconda3/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/estimators/__init__.py", line 302, in &lt;module&gt;
      from tensorflow.contrib.learn.python.learn.estimators.dnn import DNNClassifier
    File "/home/myname/anaconda3/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/estimators/dnn.py", line 35, in &lt;module&gt;
      from tensorflow.contrib.learn.python.learn.estimators import dnn_linear_combined
    File "/home/myname/anaconda3/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/estimators/dnn_linear_combined.py", line 36, in &lt;module&gt;
      from tensorflow.contrib.learn.python.learn.estimators import estimator
    File "/home/myname/anaconda3/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/estimators/estimator.py", line 52, in &lt;module&gt;
      from tensorflow.contrib.learn.python.learn.learn_io import data_feeder
    File "/home/myname/anaconda3/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/learn_io/__init__.py", line 26, in &lt;module&gt;
      from tensorflow.contrib.learn.python.learn.learn_io.dask_io import extract_dask_data
    File "/home/myname/anaconda3/lib/python3.5/site-packages/tensorflow/contrib/learn/python/learn/learn_io/dask_io.py", line 33, in &lt;module&gt;
      import dask.dataframe as dd
    File "/home/myname/anaconda3/lib/python3.5/site-packages/dask/dataframe/__init__.py", line 1, in &lt;module&gt;
      from .core import (DataFrame, Series, Index, _Frame, map_partitions,
    File "/home/myname/anaconda3/lib/python3.5/site-packages/dask/dataframe/core.py", line 23, in &lt;module&gt;
      from .. import array as da
    File "/home/myname/anaconda3/lib/python3.5/site-packages/dask/array/__init__.py", line 4, in &lt;module&gt;
      from .core import (Array, stack, concatenate, take, tensordot, transpose,
    File "/home/myname/anaconda3/lib/python3.5/site-packages/dask/array/core.py", line 13, in &lt;module&gt;
      from toolz.curried import (pipe, partition, concat, unique, pluck, join, first,
    File "/home/myname/anaconda3/lib/python3.5/site-packages/toolz/curried/__init__.py", line 53, in &lt;module&gt;
      _curry_namespace(vars(toolz)),
    File "/home/myname/anaconda3/lib/python3.5/site-packages/toolz/curried/__init__.py", line 48, in _curry_namespace
      for name, f in ns.items() if '__' not in name
    File "/home/myname/anaconda3/lib/python3.5/site-packages/toolz/curried/__init__.py", line 48, in &lt;genexpr&gt;
      for name, f in ns.items() if '__' not in name
    File "/home/myname/anaconda3/lib/python3.5/site-packages/toolz/curried/__init__.py", line 42, in _should_curry
      return (callable(f) and _nargs(f) &gt; 1 or f in do_curry)
    File "/home/myname/anaconda3/lib/python3.5/site-packages/toolz/curried/__init__.py", line 35, in _nargs
      return len(inspect.getargspec(f).args)
    File "/home/myname/anaconda3/lib/python3.5/inspect.py", line 1050, in getargspec
      raise ValueError("Function has keyword-only arguments or annotations"
  ValueError: Function has keyword-only arguments or annotations, use getfullargspec() API which can support them
  </code></pre>
  
  <p>I searched for getfullargspec() API but got even more confused. As far as I know, the getfullargspec() API from inspect can only do with something like </p>
  
  <pre><code>getfullargsspec(function_name)
  </code></pre>
  
  <p>How can I do with it? I could appreciate it a lot if you could explain the cause and also possibly a simple solution.</p>
  
  <hr>
  
  <p>Plus, I am running the code on a remote server without root permission. Command lines such as
  <strong>sudo</strong> xxxxx
  do not work for me.</p>
  
  <p>Thank you for your help!</p>