python-ballpark icon indicating copy to clipboard operation
python-ballpark copied to clipboard

`ImportError` due to importing tests that depend on `pandas`

Open johnyf opened this issue 7 years ago • 1 comments

The module ballpark.__init__ imports ballpark.tests (no need to import tests at runtime), and the module ballpark.tests imports pandas, which is absent from install_requires. As a result, after installing with pip:

In [3]: import ballpark
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-3-21d6fb214fd5> in <module>()
----> 1 import ballpark

/.../site-packages/ballpark/__init__.py in <module>()
----> 1 from . import notation, shortcuts, statistics, tests
      2 from .notation import order, extent
      3 from .notation import scientific, engineering, business
      4 from .utils import quantize, floor, ceil, round
      5 

/.../site-packages/ballpark/tests.py in <module>()
      4 import unittest
      5 
----> 6 import pandas
      7 
      8 from . import notation

ImportError: No module named 'pandas'

Not importing any tests at runtime, and adding tests_require=['pandas'] in the setup.py should address this issue. Relevant to #3.

johnyf avatar Jun 04 '17 23:06 johnyf

I second this petition, it is very expensive to install pandas on a raspberry pi :(

facastagnini avatar Dec 31 '17 02:12 facastagnini