Closed Nirvana2211 closed 2 years ago
Make sure you are using a current version of pandas. It looks from the error that the issue is with an import from pandas
Actually the issue is that exchange_calendars requires pandas>=1.1, below which you get this error. I also just saw that our setup.py still has pandas>=0.18, so we will need to change that...
Happy New Year, btw :)
It worked with the latest pandas.
I get the following error when I try to import the pandas_market_calendars. Any idea how to fix it?
Traceback (most recent call last): File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "C:\Anaconda3\envs\base_small\lib\site-packages\pandas_market_calendars__init.py", line 19, in
from .calendar_registry import get_calendar, get_calendar_names
File "C:\Anaconda3\envs\base_small\lib\site-packages\pandas_market_calendars\calendar_registry.py", line 21, in
from .exchange_calendars_mirror import *
File "C:\Anaconda3\envs\base_small\lib\site-packages\pandas_market_calendars\exchange_calendars_mirror.py", line 8, in
import exchange_calendars
File "C:\Anaconda3\envs\base_small\lib\site-packages\exchange_calendars\ init__.py", line 16, in
from .calendar_utils import (
File "C:\Anaconda3\envs\base_small\lib\site-packages\exchange_calendars\calendar_utils.py", line 4, in
from .always_open import AlwaysOpenCalendar
File "C:\Anaconda3\envs\base_small\lib\site-packages\exchange_calendars\always_open.py", line 5, in
from .exchange_calendar import ExchangeCalendar
File "C:\Anaconda3\envs\base_small\lib\site-packages\exchange_calendars\exchange_calendar.py", line 50, in
from .pandas_extensions.offsets import MultipleWeekmaskCustomBusinessDay
File "C:\Anaconda3\envs\base_small\lib\site-packages\exchange_calendars\pandas_extensions\offsets.py", line 11, in
from pandas._libs.tslibs.offsets import apply_wraps
ImportError: cannot import name 'apply_wraps' from 'pandas._libs.tslibs.offsets' (C:\Anaconda3\envs\base_small\lib\site-packages\pandas_libs\tslibs\offsets.cp37-win_amd64.pyd)
Process finished with exit code 1