不停% 2021-06-23 15:01 采纳率: 66.7%
浏览 860
已采纳

Can't determine version for numexpr

在matlab中出现下面的错误,该如何解决???

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-83-9cad6bc84e8c> in <module>
      8 cumsum_evr = np.cumsum(evr)
      9 
---> 10 ax = sns.lineplot(x=np.arange(0,len(cumsum_evr)),y=cumsum_evr,label='Explained Variance Ratio')
     11 ax.set_title('Explained Variance Ratio Using {} Components'.format(N_COMPONENTS))
     12 ax = sns.lineplot(x=np.arange(0,len(cumsum_evr)),y=evr,label='Explained Variance Of Component X')

D:\ProgramData\Anaconda3\lib\site-packages\seaborn\_decorators.py in inner_f(*args, **kwargs)
     44             )
     45         kwargs.update({k: arg for k, arg in zip(sig.parameters, args)})
---> 46         return f(**kwargs)
     47     return inner_f
     48 

D:\ProgramData\Anaconda3\lib\site-packages\seaborn\relational.py in lineplot(x, y, hue, size, style, data, palette, hue_order, hue_norm, sizes, size_order, size_norm, dashes, markers, style_order, units, estimator, ci, n_boot, seed, sort, err_style, err_kws, legend, ax, **kwargs)
    701     p._attach(ax)
    702 
--> 703     p.plot(ax, kwargs)
    704     return ax
    705 

D:\ProgramData\Anaconda3\lib\site-packages\seaborn\relational.py in plot(self, ax, kws)
    481             # matplotlib to show "gaps" in the line when all values are missing.
    482             # This is straightforward absent aggregation, but complicated with it.
--> 483             sub_data = sub_data.dropna()
    484 
    485             # Due to the original design, code below was written assuming that

D:\ProgramData\Anaconda3\lib\site-packages\pandas\core\frame.py in dropna(self, axis, how, thresh, subset, inplace)
   5168             mask = count >= thresh
   5169         elif how == "any":
-> 5170             mask = count == len(agg_obj._get_axis(agg_axis))
   5171         elif how == "all":
   5172             mask = count > 0

D:\ProgramData\Anaconda3\lib\site-packages\pandas\core\ops\common.py in new_method(self, other)
     63         other = item_from_zerodim(other)
     64 
---> 65         return method(self, other)
     66 
     67     return new_method

D:\ProgramData\Anaconda3\lib\site-packages\pandas\core\arraylike.py in __eq__(self, other)
     27     @unpack_zerodim_and_defer("__eq__")
     28     def __eq__(self, other):
---> 29         return self._cmp_method(other, operator.eq)
     30 
     31     @unpack_zerodim_and_defer("__ne__")

D:\ProgramData\Anaconda3\lib\site-packages\pandas\core\series.py in _cmp_method(self, other, op)
   4976         rvalues = extract_array(other, extract_numpy=True)
   4977 
-> 4978         res_values = ops.comparison_op(lvalues, rvalues, op)
   4979 
   4980         return self._construct_result(res_values, name=res_name)

D:\ProgramData\Anaconda3\lib\site-packages\pandas\core\ops\array_ops.py in comparison_op(left, right, op)
    248             warnings.simplefilter("ignore", DeprecationWarning)
    249             with np.errstate(all="ignore"):
--> 250                 res_values = _na_arithmetic_op(lvalues, rvalues, op, is_cmp=True)
    251 
    252     return res_values

D:\ProgramData\Anaconda3\lib\site-packages\pandas\core\ops\array_ops.py in _na_arithmetic_op(left, right, op, is_cmp)
    137     TypeError : invalid operation
    138     """
--> 139     import pandas.core.computation.expressions as expressions
    140 
    141     try:

D:\ProgramData\Anaconda3\lib\site-packages\pandas\core\computation\expressions.py in <module>
     16 from pandas.core.dtypes.generic import ABCDataFrame
     17 
---> 18 from pandas.core.computation.check import NUMEXPR_INSTALLED
     19 from pandas.core.ops import roperator
     20 

D:\ProgramData\Anaconda3\lib\site-packages\pandas\core\computation\check.py in <module>
      1 from pandas.compat._optional import import_optional_dependency
      2 
----> 3 ne = import_optional_dependency("numexpr", raise_on_missing=False, on_version="warn")
      4 NUMEXPR_INSTALLED = ne is not None
      5 if NUMEXPR_INSTALLED:

D:\ProgramData\Anaconda3\lib\site-packages\pandas\compat\_optional.py in import_optional_dependency(name, extra, raise_on_missing, on_version)
    113     minimum_version = VERSIONS.get(name)
    114     if minimum_version:
--> 115         version = get_version(module)
    116         if distutils.version.LooseVersion(version) < minimum_version:
    117             assert on_version in {"warn", "raise", "ignore"}

D:\ProgramData\Anaconda3\lib\site-packages\pandas\compat\_optional.py in get_version(module)
     54 
     55     if version is None:
---> 56         raise ImportError(f"Can't determine version for {module.__name__}")
     57     return version
     58 

ImportError: Can't determine version for numexpr

采用了这个博客的方法也没有解决.ImportError: Can't determine version for bottleneck_茧将的博客-CSDN博客

展开全部

  • 写回答

2条回答 默认 最新

  • 不停% 2021-06-29 07:19
    关注

    由于我要完成作业,通过浏览了大量文档,我觉得应该是我当时手贱,不小心升级了某个库,导致包之间版本有冲突。然后我就直接删了所以库,重新安装。然后就没有出现这个问题了。

    虽然有点笨,但也不失为一种解决方法。简单暴力。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)
编辑
预览

报告相同问题?

悬赏问题

  • ¥15 fluent设置了自动保存后,会有几个时间点不保存
  • ¥20 激光照射到四象线探测器,通过液晶屏显示X、Y值
  • ¥15 这怎么做,怎么在我的思路下改下我这写的不对
  • ¥50 数据库开发问题求解答
  • ¥15 安装anaconda时报错
  • ¥20 如何用Python处理单元格内连续出现的重复词语?
  • ¥15 小程序有个导出到插件方式,我是在分包下引入的插件,这个export的路径对吗,我看官方文档上写的是相对路径
  • ¥20 希望有人能帮我完成这个设计( *ˊᵕˋ)
  • ¥100 将Intptr传入SetHdevmode()将Intptr传入后转换为DEVMODE的值与外部代码不一致
  • ¥50 基于ERA5数据计算VPD