Open dhimmel opened 5 years ago
Similar issue with scipy
:
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-2-a8f39505b870> in <module>
----> 1 import xswap
~/anaconda3/envs/xswap/lib/python3.7/site-packages/xswap/__init__.py in <module>
----> 1 from xswap import network_formats
2 from xswap import preprocessing
3 from xswap import prior
4 from xswap.permute import permute_edge_list
5
~/anaconda3/envs/xswap/lib/python3.7/site-packages/xswap/network_formats.py in <module>
2
3 import numpy
----> 4 import scipy.sparse
5
6
ModuleNotFoundError: No module named 'scipy'
And pandas
:
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-a8f39505b870> in <module>
----> 1 import xswap
~/anaconda3/envs/xswap/lib/python3.7/site-packages/xswap/__init__.py in <module>
1 from xswap import network_formats
2 from xswap import preprocessing
----> 3 from xswap import prior
4 from xswap.permute import permute_edge_list
5
~/anaconda3/envs/xswap/lib/python3.7/site-packages/xswap/prior.py in <module>
2
3 import numpy
----> 4 import pandas
5 import scipy.sparse
6
ModuleNotFoundError: No module named 'pandas'
BTW these errors are using https://github.com/hetio/xswap/releases/tag/v0.0.2 which is 6 commits behind master currently.
I think we wanted users without numpy to be able to use the package, right? So we should probably just make the numpy import lazy.
Also you may want to specify
extras_require
insetup.py
for users who want to install the extra dependencies.