I had an issue where pandas would report an import error, upon attempting to use a buffer from io's StringIO class, during the use of read_csv() from pandas.
Asked
Active
Viewed 7,560 times
1 Answers
2
Installing fsspec (an optional package for pandas) alone is not enough for pandas to be able to import fsspec. The dependecies for fsspec need also be installed, I don't know why the maintainers are not handling this with install.py, but here we are. I'll send them a message, but if you find your self in this condition, try:
pip install tox tox-conda

user1802263
- 93
- 1
- 7
-
I am not sure how your solution of installing `tox` and `tox-conda` has anything to do with `fsspec` and `read_csf()`... could you elaborate? – Jürgen Gmach Jun 24 '21 at 15:22
-
I thought I explained it well enough, my fault: When you install fsspec, the dependencies tox, and tox-conda are not installed. You can check the pyPI entry to see the instructions for using the library. AFAICT: using pandas with a buffer containing a bytestring, requires the optional package fsspec. fsspec failed to work on my macintosh without manually installing tox and tox-conda. Does that track a bit better? – user1802263 Jun 24 '21 at 15:52
-
Thank you! I guess this depends what you try to do. From reading the docs of fspring, both tox and tox-conda are dev and test dependencies, not runtime or build dependencies. Anyway, glad you figured it out – Jürgen Gmach Jun 24 '21 at 18:28