File D:\ANACONDA\lib\site-packages\pandas\core\ops\array_ops.py:50
40 from pandas.core.dtypes.generic import (
41 ABCExtensionArray,
42 ABCIndex,
43 ABCSeries,
44 )
45 from pandas.core.dtypes.missing import (
46 isna,
47 notna,
48 )
---> 50 import pandas.core.computation.expressions as expressions
51 from pandas.core.construction import ensure_wrapped_if_datetimelike
52 from pandas.core.ops import (
53 missing,
54 roperator,
55 )
File D:\ANACONDA\lib\site-packages\pandas\core\computation\expressions.py:20
17 from pandas._typing import FuncType
18 from pandas.util._exceptions import find_stack_level
---> 20 from pandas.core.computation.check import NUMEXPR_INSTALLED
21 from pandas.core.ops import roperator
23 if NUMEXPR_INSTALLED:
File D:\ANACONDA\lib\site-packages\pandas\core\computation\check.py:5
1 from future import annotations
3 from pandas.compat._optional import import_optional_dependency
----> 5 ne = import_optional_dependency("numexpr", errors="warn")
6 NUMEXPR_INSTALLED = ne is not None
7 if NUMEXPR_INSTALLED:
File D:\ANACONDA\lib\site-packages\pandas\compat_optional.py:157, in import_optional_dependency(name, extra, errors, min_version)
155 minimum_version = min_version if min_version is not None else VERSIONS.get(parent)
156 if minimum_version:
--> 157 version = get_version(module_to_get)
158 if version and Version(version) < Version(minimum_version):
159 msg = (
160 f"Pandas requires version '{minimum_version}' or newer of '{parent}' "
161 f"(version '{version}' currently installed)."
162 )
File D:\ANACONDA\lib\site-packages\pandas\compat_optional.py:83, in get_version(module)
79 if module.name == "snappy":
80 # snappy doesn't contain attributes to confirm it's version
81 # See https://github.com/andrix/python-snappy/pull/119
82 return ""
---> 83 raise ImportError(f"Can't determine version for {module.name}")
84 if module.name == "psycopg2":
85 # psycopg2 appends " (dt dec pq3 ext lo64)" to it's version
86 version = version.split()[0]
ImportError Traceback (most recent call last) Cell In[5], line 2 1 import matplotlib as mpl ----> 2 import tushare as ts 3 import matplotlib.pyplot as plt 4 import mpl_finance as mpf
File D:\ANACONDA\lib\site-packages\tushare__init.py:11 6 author__ = 'Jimmy Liu' 8 """ 9 for trading data 10 """ ---> 11 from tushare.stock.trading import (get_hist_data, get_tick_data, 12 get_today_all, get_realtime_quotes, 13 get_h_data, get_today_ticks, 14 get_index, get_hists, 15 get_k_data, get_day_all, 16 get_sina_dd, bar, tick, 17 get_markets, quotes, 18 get_instrument, reset_instrument) 20 """ 21 for trading data 22 """ 23 from tushare.stock.fundamental import (get_stock_basics, get_report_data, 24 get_profit_data, 25 get_operation_data, get_growth_data, 26 get_debtpaying_data, get_cashflow_data, 27 get_balance_sheet, get_profit_statement, get_cash_flow)
File D:\ANACONDA\lib\site-packages\tushare\stock\trading.py:15 13 import lxml.html 14 from lxml import etree ---> 15 import pandas as pd 16 import numpy as np 17 import datetime
File D:\ANACONDA\lib\site-packages\pandas__init__.py:48 45 # let init-time option registration happen 46 import pandas.core.config_init # pyright: ignore # noqa:F401 ---> 48 from pandas.core.api import ( 49 # dtype 50 ArrowDtype, 51 Int8Dtype, 52 Int16Dtype, 53 Int32Dtype, 54 Int64Dtype, 55 UInt8Dtype, 56 UInt16Dtype, 57 UInt32Dtype, 58 UInt64Dtype, 59 Float32Dtype, 60 Float64Dtype, 61 CategoricalDtype, 62 PeriodDtype, 63 IntervalDtype, 64 DatetimeTZDtype, 65 StringDtype, 66 BooleanDtype, 67 # missing 68 NA, 69 isna, 70 isnull, 71 notna, 72 notnull, 73 # indexes 74 Index, 75 CategoricalIndex, 76 RangeIndex, 77 MultiIndex, 78 IntervalIndex, 79 TimedeltaIndex, 80 DatetimeIndex, 81 PeriodIndex, 82 IndexSlice, 83 # tseries 84 NaT, 85 Period, 86 period_range, 87 Timedelta, 88 timedelta_range, 89 Timestamp, 90 date_range, 91 bdate_range, 92 Interval, 93 interval_range, 94 DateOffset, 95 # conversion 96 to_numeric, 97 to_datetime, 98 to_timedelta, 99 # misc 100 Flags, 101 Grouper, 102 factorize, 103 unique, 104 value_counts, 105 NamedAgg, 106 array, 107 Categorical, 108 set_eng_float_format, 109 Series, 110 DataFrame, 111 ) 113 from pandas.core.arrays.sparse import SparseDtype 115 from pandas.tseries.api import infer_freq
File D:\ANACONDA\lib\site-packages\pandas\core\api.py:27 15 from pandas.core.dtypes.missing import ( 16 isna, 17 isnull, 18 notna, 19 notnull, 20 ) 22 from pandas.core.algorithms import ( 23 factorize, 24 unique, 25 value_counts, 26 ) ---> 27 from pandas.core.arrays import Categorical 28 from pandas.core.arrays.arrow import ArrowDtype 29 from pandas.core.arrays.boolean import BooleanDtype
File D:\ANACONDA\lib\site-packages\pandas\core\arrays__init__.py:1 ----> 1 from pandas.core.arrays.arrow import ArrowExtensionArray 2 from pandas.core.arrays.base import ( 3 ExtensionArray, 4 ExtensionOpsMixin, 5 ExtensionScalarOpsMixin, 6 ) 7 from pandas.core.arrays.boolean import BooleanArray
File D:\ANACONDA\lib\site-packages\pandas\core\arrays\arrow__init.py:1 ----> 1 from pandas.core.arrays.arrow.array import ArrowExtensionArray 2 from pandas.core.arrays.arrow.dtype import ArrowDtype 4 all__ = ["ArrowDtype", "ArrowExtensionArray"]
File D:\ANACONDA\lib\site-packages\pandas\core\arrays\arrow\array.py:42 39 from pandas.core.dtypes.missing import isna 41 from pandas.core.algorithms import resolve_na_sentinel ---> 42 from pandas.core.arraylike import OpsMixin 43 from pandas.core.arrays.base import ExtensionArray 44 from pandas.core.indexers import ( 45 check_array_indexer, 46 unpack_tuple_and_ellipses, 47 validate_indices, 48 )
File D:\ANACONDA\lib\site-packages\pandas\core\arraylike.py:23 21 from pandas.core import roperator 22 from pandas.core.construction import extract_array ---> 23 from pandas.core.ops.common import unpack_zerodim_and_defer 25 REDUCTION_ALIASES = { 26 "maximum": "max", 27 "minimum": "min", 28 "add": "sum", 29 "multiply": "prod", 30 } 33 class OpsMixin: 34 # ------------------------------------------------------------- 35 # Comparisons
File D:\ANACONDA\lib\site-packages\pandas\core\ops__init__.py:33 27 from pandas.core.dtypes.missing import isna 29 from pandas.core import ( 30 algorithms, 31 roperator, 32 ) ---> 33 from pandas.core.ops.array_ops import ( 34 arithmetic_op, 35 comp_method_OBJECT_ARRAY, 36 comparison_op, 37 get_array_op, 38 logical_op, 39 maybe_prepare_scalar_for_op, 40 ) 41 from pandas.core.ops.common import ( 42 get_op_result_name, 43 unpack_zerodim_and_defer, 44 ) 45 from pandas.core.ops.docstrings import ( 46 _flex_comp_doc_FRAME, 47 _op_descriptions, 48 make_flex_doc, 49 )
File D:\ANACONDA\lib\site-packages\pandas\core\ops\array_ops.py:50 40 from pandas.core.dtypes.generic import ( 41 ABCExtensionArray, 42 ABCIndex, 43 ABCSeries, 44 ) 45 from pandas.core.dtypes.missing import ( 46 isna, 47 notna, 48 ) ---> 50 import pandas.core.computation.expressions as expressions 51 from pandas.core.construction import ensure_wrapped_if_datetimelike 52 from pandas.core.ops import ( 53 missing, 54 roperator, 55 )
File D:\ANACONDA\lib\site-packages\pandas\core\computation\expressions.py:20 17 from pandas._typing import FuncType 18 from pandas.util._exceptions import find_stack_level ---> 20 from pandas.core.computation.check import NUMEXPR_INSTALLED 21 from pandas.core.ops import roperator 23 if NUMEXPR_INSTALLED:
File D:\ANACONDA\lib\site-packages\pandas\core\computation\check.py:5 1 from future import annotations 3 from pandas.compat._optional import import_optional_dependency ----> 5 ne = import_optional_dependency("numexpr", errors="warn") 6 NUMEXPR_INSTALLED = ne is not None 7 if NUMEXPR_INSTALLED:
File D:\ANACONDA\lib\site-packages\pandas\compat_optional.py:157, in import_optional_dependency(name, extra, errors, min_version) 155 minimum_version = min_version if min_version is not None else VERSIONS.get(parent) 156 if minimum_version: --> 157 version = get_version(module_to_get) 158 if version and Version(version) < Version(minimum_version): 159 msg = ( 160 f"Pandas requires version '{minimum_version}' or newer of '{parent}' " 161 f"(version '{version}' currently installed)." 162 )
File D:\ANACONDA\lib\site-packages\pandas\compat_optional.py:83, in get_version(module) 79 if module.name == "snappy": 80 # snappy doesn't contain attributes to confirm it's version 81 # See https://github.com/andrix/python-snappy/pull/119 82 return "" ---> 83 raise ImportError(f"Can't determine version for {module.name}") 84 if module.name == "psycopg2": 85 # psycopg2 appends " (dt dec pq3 ext lo64)" to it's version 86 version = version.split()[0]
ImportError: Can't determine version for numexpr