question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ImportError: Can't determine version for numexpr

See original GitHub issue

I copy and pasted the tutorial for creating data visualizations in Seaborn (link found here), but I run into this issue where it says that it cannot determine the version of numexpr. I tried reinstalling pandas, seaborn, numpy, and numexpr but it has not changed the result. Any feedback would be greatly appreciated.

`--------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-178-1b75b91045e5> in <module> 1 dots = sns.load_dataset(“dots”) ----> 2 sns.relplot( 3 data=dots, kind=“line”, 4 x=“time”, y=“firing_rate”, col=“align”, 5 hue=“choice”, size=“coherence”, style=“choice”,

~\anaconda3\lib\site-packages\seaborn\relational.py in relplot(x, y, hue, size, style, data, row, col, col_wrap, row_order, col_order, palette, hue_order, hue_norm, sizes, size_order, size_norm, markers, dashes, style_order, legend, kind, height, aspect, facet_kws, **kwargs)

~\anaconda3\lib\site-packages\seaborn\axisgrid.py in map_dataframe(self, func, *args, **kwargs) 818 “”“Label the x axis on the bottom row of the grid.”“” 819 if label is None: –> 820 label = self._x_var 821 for ax in self._bottom_axes: 822 ax.set_xlabel(label, **kwargs)

~\anaconda3\lib\site-packages\seaborn\axisgrid.py in _facet_plot(self, func, ax, plot_args, plot_kwargs) 836 ax.set_ylabel(“”) 837 return self –> 838 839 def set_xticklabels(self, labels=None, step=None, **kwargs): 840 “”“Set x axis tick labels of the grid.”“”

~\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, sort, err_style, err_kws, legend, ax, **kwargs) 1082 Grouping variable that will produce elements with different styles. 1083 Can have a numeric dtype but will always be treated as categorical. -> 1084 {params.core.data} 1085 {params.facets.rowcol} 1086 {params.facets.col_wrap}

~\anaconda3\lib\site-packages\seaborn\relational.py in plot(self, ax, kws) 764 Returns 765 ------- –> 766 {returns.ax} 767 768 See Also

~\anaconda3\lib\site-packages\seaborn\relational.py in subset_data(self) 319 marker=attrs.get(“marker”, “”), 320 dashes=attrs.get(“dashes”, “”), –> 321 ) 322 323 func = getattr(ax, self._legend_func)

~\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

~\anaconda3\lib\site-packages\pandas\core\ops_init_.py in wrapper(self, other) 368 rvalues = extract_array(other, extract_numpy=True) 369 –> 370 res_values = comparison_op(lvalues, rvalues, op) 371 372 return self._construct_result(res_values, name=res_name)

~\anaconda3\lib\site-packages\pandas\core\ops\array_ops.py in comparison_op(left, right, op) 249 warnings.simplefilter(“ignore”, DeprecationWarning) 250 with np.errstate(all=“ignore”): –> 251 res_values = na_arithmetic_op(lvalues, rvalues, op, is_cmp=True) 252 253 return res_values

~\anaconda3\lib\site-packages\pandas\core\ops\array_ops.py in na_arithmetic_op(left, right, op, is_cmp) 138 TypeError : invalid operation 139 “”" –> 140 import pandas.core.computation.expressions as expressions 141 142 try:

~\anaconda3\lib\site-packages\pandas\core\computation\expressions.py in <module> 15 from pandas.core.dtypes.generic import ABCDataFrame 16 —> 17 from pandas.core.computation.check import _NUMEXPR_INSTALLED 18 from pandas.core.ops import roperator 19

~\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:

~\anaconda3\lib\site-packages\pandas\compat_optional.py in import_optional_dependency(name, extra, raise_on_missing, on_version) 114 minimum_version = VERSIONS.get(name) 115 if minimum_version: –> 116 version = _get_version(module) 117 if distutils.version.LooseVersion(version) < minimum_version: 118 assert on_version in {“warn”, “raise”, “ignore”}

~\anaconda3\lib\site-packages\pandas\compat_optional.py in _get_version(module) 55 56 if version is None: —> 57 raise ImportError(f"Can’t determine version for {module.name}") 58 return version 59

ImportError: Can’t determine version for numexpr`

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
robbmcleodcommented, Jan 4, 2021

The attribute is numexpr.__version__, not numexpr.version.

How did you install pandas? Are you using a mixture of pip and conda?

Maybe take a look in the directory ~\anaconda3\lib\site-packages\ and look and see what’s in the numexpr sub-directory? Sounds like you have a broken numexpr install. Cleaning up site-packages and reinstalling it might fix the problem.

0reactions
vuniettocommented, Mar 5, 2022

I’m going to close this one as we haven’t heard back from the reporter in a couple of months.

You solve my problem,thx a lot

Read more comments on GitHub >

github_iconTop Results From Across the Web

ImportError: Can't determine version for bottleneck
I encoutered this issue. Here's what worked for me. Try to update pandas. conda update pandas. Remove and install bottleneck.
Read more >
Solving: import error can't determine version for bottleneck
Simple! Just search anaconda prompt on your machine and do an update to your pandas packages using this command line ;. conda/pip update...
Read more >
Why do I get ImportError when trying to import Pandas Python ...
numexpr is present in Ubuntu's repositories. So, install it by running: sudo apt-get install python-numexpr.
Read more >
how to find a pandas supported version? #2 - numexpr - GitHub
ImportError: 'numexpr' is not installed or an unsupported version. Cannot use engine='numexpr' for query/eval if 'numexpr' is not installed.
Read more >
ImportError: Can't determine version for numexpr_未知量z的博客
机器:tfGPU 2. 问题1:ImportError: Can't determine version for numexpr. 解决方法:安装numexpr,ok pip install numexpr.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found