Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Python中导入pmdarima.arima库时出错_Python_Pyramid Arima - Fatal编程技术网

在Python中导入pmdarima.arima库时出错

在Python中导入pmdarima.arima库时出错,python,pyramid-arima,Python,Pyramid Arima,在尝试导入Python的pmdarima.arima库时,是否有人可以帮助我解决以下错误消息 ERROR:root:Internal Python error in the inspect module. Below is the traceback from this internal error. Traceback (most recent call last): File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/IPyt

在尝试导入Python的
pmdarima.arima
库时,是否有人可以帮助我解决以下错误消息

ERROR:root:Internal Python error in the inspect module.
Below is the traceback from this internal error.

Traceback (most recent call last):
  File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 3326, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-1-6858fadc5169>", line 1, in <module>
    from pmdarima.arima import auto_arima
  File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/pmdarima/__init__.py", line 45, in <module>
    from .arima import auto_arima, ARIMA, AutoARIMA
  File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/pmdarima/arima/__init__.py", line 6, in <module>
    from .arima import *
  File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/pmdarima/arima/arima.py", line 10, in <module>
    from sklearn.metrics import mean_absolute_error, mean_squared_error
  File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/sklearn/metrics/__init__.py", line 7, in <module>
    from .ranking import auc
  File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/sklearn/metrics/ranking.py", line 35, in <module>
    from ..preprocessing import label_binarize
  File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/sklearn/preprocessing/__init__.py", line 6, in <module>
    from ._function_transformer import FunctionTransformer
  File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/sklearn/preprocessing/_function_transformer.py", line 5, in <module>
    from ..utils.testing import assert_allclose_dense_sparse
  File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/sklearn/utils/testing.py", line 718, in <module>
    import pytest
  File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/pytest.py", line 13, in <module>
    from _pytest.fixtures import fixture, yield_fixture
  File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/_pytest/fixtures.py", line 842, in <module>
    class FixtureFunctionMarker(object):
  File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/_pytest/fixtures.py", line 844, in FixtureFunctionMarker
    params = attr.ib(convert=attr.converters.optional(tuple))
TypeError: attrib() got an unexpected keyword argument 'convert'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/IPython/core/interactiveshell.py", line 2040, in showtraceback
    stb = value._render_traceback_()
AttributeError: 'TypeError' object has no attribute '_render_traceback_'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/IPython/core/ultratb.py", line 1101, in get_records
    return _fixed_getinnerframes(etb, number_of_lines_of_context, tb_offset)
  File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/IPython/core/ultratb.py", line 319, in wrapped
    return f(*args, **kwargs)
  File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/IPython/core/ultratb.py", line 353, in _fixed_getinnerframes
    records = fix_frame_records_filenames(inspect.getinnerframes(etb, context))
  File "/Users/jdoe/anaconda3/lib/python3.6/inspect.py", line 1490, in getinnerframes
    frameinfo = (tb.tb_frame,) + getframeinfo(tb, context)
  File "/Users/jdoe/anaconda3/lib/python3.6/inspect.py", line 1448, in getframeinfo
    filename = getsourcefile(frame) or getfile(frame)
  File "/Users/jdoe/anaconda3/lib/python3.6/inspect.py", line 696, in getsourcefile
    if getattr(getmodule(object, filename), '__loader__', None) is not None:
  File "/Users/jdoe/anaconda3/lib/python3.6/inspect.py", line 733, in getmodule
    if ismodule(module) and hasattr(module, '__file__'):
  File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/py/_vendored_packages/apipkg.py", line 195, in __getattribute__
    return getattr(getmod(), name)
  File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/py/_vendored_packages/apipkg.py", line 179, in getmod
    x = importobj(modpath, None)
  File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/py/_vendored_packages/apipkg.py", line 69, in importobj
    module = __import__(modpath, None, None, ['__doc__'])
  File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/pytest.py", line 13, in <module>
    from _pytest.fixtures import fixture, yield_fixture
  File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/_pytest/fixtures.py", line 842, in <module>
    class FixtureFunctionMarker(object):
  File "/Users/jdoe/anaconda3/lib/python3.6/site-packages/_pytest/fixtures.py", line 844, in FixtureFunctionMarker
    params = attr.ib(convert=attr.converters.optional(tuple))
TypeError: attrib() got an unexpected keyword argument 'convert'
ERROR:root:inspect模块中的内部Python错误。
下面是此内部错误的回溯。
回溯(最近一次呼叫最后一次):
文件“/Users/jdoe/anaconda3/lib/python3.6/site packages/IPython/core/interactiveshell.py”,第3326行,运行代码
exec(代码对象、self.user\u全局、self.user\n)
文件“”,第1行,在
从pmdarima.arima导入自动\u arima
文件“/Users/jdoe/anaconda3/lib/python3.6/site-packages/pmdarima/_-init__.py”,第45行,在
from.arima导入auto_arima,arima,AutoARIMA
文件“/Users/jdoe/anaconda3/lib/python3.6/site packages/pmdarima/arima/_init__.py”,第6行,在
来自arima import*
文件“/Users/jdoe/anaconda3/lib/python3.6/site packages/pmdarima/arima/arima.py”,第10行,在
从sklearn.metrics导入平均绝对误差、平均平方误差
文件“/Users/jdoe/anaconda3/lib/python3.6/site packages/sklearn/metrics/_init__.py”,第7行,在
来自。排名进口auc
文件“/Users/jdoe/anaconda3/lib/python3.6/site packages/sklearn/metrics/ranking.py”,第35行,在
从..预处理导入标签\u二值化
文件“/Users/jdoe/anaconda3/lib/python3.6/site packages/sklearn/preprocessing/_init__.py”,第6行,在
from.\u函数\u转换器导入函数转换器
文件“/Users/jdoe/anaconda3/lib/python3.6/site packages/sklearn/preprocessing/_function_transformer.py”,第5行,在
from..utils.testing导入断言\u allclose\u densite\u sparse
文件“/Users/jdoe/anaconda3/lib/python3.6/site packages/sklearn/utils/testing.py”,第718行,在
导入pytest
文件“/Users/jdoe/anaconda3/lib/python3.6/site packages/pytest.py”,第13行,在
从_pytest.fixtures导入fixture,屈服_fixture
文件“/Users/jdoe/anaconda3/lib/python3.6/site packages/_pytest/fixtures.py”,第842行,在
类FixtureFunctionMarker(对象):
FixtureFunctionMarker中的文件“/Users/jdoe/anaconda3/lib/python3.6/site packages/_pytest/fixtures.py”,第844行
params=attr.ib(convert=attr.converters.optional(元组))
TypeError:attrib()获得意外的关键字参数“convert”
在处理上述异常期间,发生了另一个异常:
回溯(最近一次呼叫最后一次):
showtraceback中的文件“/Users/jdoe/anaconda3/lib/python3.6/site packages/IPython/core/interactiveshell.py”,第2040行
stb=值。_呈现_回溯()
AttributeError:“TypeError”对象没有属性“\u render\u traceback”
在处理上述异常期间,发生了另一个异常:
回溯(最近一次呼叫最后一次):
get_记录中的文件“/Users/jdoe/anaconda3/lib/python3.6/site packages/IPython/core/ultratb.py”,第1101行
返回\u固定\u getinnerframes(etb、\u行数\u上下文、tb\u偏移量)
文件“/Users/jdoe/anaconda3/lib/python3.6/site-packages/IPython/core/ultratb.py”,第319行,包装为
返回f(*args,**kwargs)
文件“/Users/jdoe/anaconda3/lib/python3.6/site packages/IPython/core/ultratb.py”,第353行,在固定的内部框架中
records=fix\u frame\u records\u文件名(inspect.getinnerframes(etb,context))
文件“/Users/jdoe/anaconda3/lib/python3.6/inspect.py”,第1490行,在getinnerframes中
frameinfo=(tb.tb_frame,)+getframeinfo(tb,context)
文件“/Users/jdoe/anaconda3/lib/python3.6/inspect.py”,第1448行,在getframeinfo中
文件名=getsourcefile(框架)或getfile(框架)
文件“/Users/jdoe/anaconda3/lib/python3.6/inspect.py”,第696行,在getsourcefile中
如果getattr(getmodule(对象,文件名),“\uuuuu loader\uuuuu”,None)不是None:
文件“/Users/jdoe/anaconda3/lib/python3.6/inspect.py”,第733行,在getmodule中
如果ismodule(模块)和hasattr(模块,'.'.'文件'.''.'文件'):
文件“/Users/jdoe/anaconda3/lib/python3.6/site packages/py/_vendored_packages/apipkg.py”,第195行,在uu getattribute中__
返回getattr(getmod(),name)
getmod中的文件“/Users/jdoe/anaconda3/lib/python3.6/site packages/py/_vendored_packages/apipkg.py”,第179行
x=importobj(modpath,无)
importobj中的文件“/Users/jdoe/anaconda3/lib/python3.6/site packages/py/_vendored_packages/apipkg.py”,第69行
模块=\uuuu导入(modpath,无,无,[''\uuuu文档\uuuuu'])
文件“/Users/jdoe/anaconda3/lib/python3.6/site packages/pytest.py”,第13行,在
从_pytest.fixtures导入fixture,屈服_fixture
文件“/Users/jdoe/anaconda3/lib/python3.6/site packages/_pytest/fixtures.py”,第842行,在
类FixtureFunctionMarker(对象):
FixtureFunctionMarker中的文件“/Users/jdoe/anaconda3/lib/python3.6/site packages/_pytest/fixtures.py”,第844行
params=attr.ib(convert=attr.converters.optional(元组))
TypeError:attrib()获得意外的关键字参数“convert”

我搜索了最后出现的类型错误,这导致了一个相关的StackOverflow问题,该问题的答案表明过时的
pytest
版本会导致问题。此后,我升级了我的
pytest
版本,解决了我的问题