Opened 4 years ago

Closed 4 years ago

#60971 closed defect (invalid)

py37-pandas fails to load urlencode deep in pandas_datareader

Reported by: neilt (Neil Tiffin) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.6.3
Keywords: Cc: stromnov (Andrey Stromnov)
Port: py37-pandas

Description

/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pandas_datareader/compat/__init__.py:7: FutureWarning: pandas.util.testing is deprecated. Use the functions in the public API at pandas.testing instead.
  from pandas.util.testing import assert_frame_equal
Traceback (most recent call last):
  File "rss_feed_import_from_vienna.py", line 68, in <module>
    from common_code import *
  File "/Users/Shared/Code/PythonProcessing/common_code.py", line 22, in <module>
    import pandas_datareader.data as web
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pandas_datareader/__init__.py", line 2, in <module>
    from .data import (
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pandas_datareader/data.py", line 11, in <module>
    from pandas_datareader.av.forex import AVForexReader
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pandas_datareader/av/__init__.py", line 6, in <module>
    from pandas_datareader.base import _BaseReader
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pandas_datareader/base.py", line 7, in <module>
    from pandas.io.common import urlencode
ImportError: cannot import name 'urlencode' from 'pandas.io.common' (/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pandas/io/common.py)
mini2:PythonProcessing$ port installed | grep -i pandas
  py37-pandas @1.1.0_0 (active)
mini2:PythonProcessing$ 

Change History (2)

comment:1 Changed 4 years ago by neilt (Neil Tiffin)

At this point I don't think pandas_datareader was installed by MacPorts, but rather by pip. This was after an OS upgrade to Catalina where I thought all ports were removed and reinstalled. But evidently pip installations were not deleted even though python was uninstalled. After upgrading pandas_datareader through pip the problem went away so this ticket can be closed.

comment:2 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: stromnov added
Port: pandas_datareader removed
Resolution: invalid
Status: newclosed

Correct, uninstalling a port only uninstalls the files that port installed, not files that you might have created by using that port (such as things that you might have installed using pip).

We don't have a py-pandas-datareader port but if you'd like to submit one, please do. Or maybe Andrew will create one since he maintains a lot of other Python ports.

Note: See TracTickets for help on using tickets.