Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name 'parse_time_string' from 'pandas.core.tools.datetimes' #128

Closed
emiliom opened this issue Jul 30, 2020 · 1 comment

Comments

@emiliom
Copy link

emiliom commented Jul 30, 2020

I just built a conda environment today with erddapy and pandas, among other things. No version pinning at all. Python 3.8.5, pandas 1.1.0, erddapy 0.5.3. Just importing erddapy produces the pandas error below.

Same issue when I built the conda env while pinning Python to 3.7.

Any suggestions for pinning a specific version of Pandas, erddapy or both to get past this issue? Thanks!

~/miniconda/envs/nvsgliderapp/lib/python3.8/site-packages/erddapy/__init__.py in <module>
----> 1 from erddapy.erddapy import ERDDAP, servers
      2 
      3 __all__ = ["ERDDAP", "servers"]
      4 
      5 from ._version import get_versions

~/miniconda/envs/nvsgliderapp/lib/python3.8/site-packages/erddapy/erddapy.py in <module>
     13 import pandas as pd
     14 
---> 15 from erddapy.utilities import (
     16     _check_url_response,
     17     _tempnc,

~/miniconda/envs/nvsgliderapp/lib/python3.8/site-packages/erddapy/utilities.py in <module>
     11 import pytz
     12 import requests
---> 13 from pandas.core.tools.datetimes import parse_time_string
     14 
     15 _server = namedtuple("server", ["description", "url"])

ImportError: cannot import name 'parse_time_string' from 'pandas.core.tools.datetimes' (/home/mayorga/miniconda/envs/nvsgliderapp/lib/python3.8/site-packages/pandas/core/tools/datetimes.py)
@emiliom
Copy link
Author

emiliom commented Jul 31, 2020

FYI, I tried to find on what version pandas.core.tools.datetimes.parse_time_string was deprecated, but couldn't find it. What I was able to do is confirm that it's present in pandas 1.0.1, so I'm going with that (pinning my conda env to that pandas version).

This statement from the pandas API docs is worth noting:

Warning
The pandas.core, pandas.compat, and pandas.util top-level modules are PRIVATE. Stable functionality in such modules is not guaranteed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant