jazzband / tablib

Python Module for Tabular Datasets in XLS, CSV, JSON, YAML, &c.
https://tablib.readthedocs.io/
MIT License
4.59k stars 590 forks source link

tablib=1.0.0 #447

Closed mhmrx closed 4 years ago

mhmrx commented 4 years ago

tablib in version 1.0 which is installed as dependency of django-import-export causes errors, it doesnt download its dependencies as it was in 0.14.0:

- markuppy [required: Any, installed: 1.14]
- odfpy [required: Any, installed: 1.4.0]
  - defusedxml [required: Any, installed: 0.6.0]
- openpyxl [required: >=2.4.0, installed: 3.0.3]
  - et-xmlfile [required: Any, installed: 1.0.1]
  - jdcal [required: Any, installed: 1.4.1]
- pyyaml [required: Any, installed: 5.3]
- xlrd [required: Any, installed: 1.2.0]
- xlwt [required: Any, installed: 1.3.0]

dependencies in v 1.0 look like this:

  • diff-match-patch [required: Any, installed: 20181111]
  • django [required: >=1.8, installed: 2.1.15]
    • pytz [required: Any, installed: 2019.3]
  • tablib [required: Any, installed: 1.0.0]

and then generates errors with imports like this:

File "/usr/local/lib/python3.6/site-packages/tablib/formats/_xlsx.py", line 6, in <module> import openpyxl ModuleNotFoundError: No module named 'openpyxl'

hugovk commented 4 years ago

In 1.0, you need to specify the dependencies you need.

For example, pip install tablib[xlsx] or pip install tablib[all].

Docs:

mhmrx commented 4 years ago

Ok. Didn't know that. It took me a lot of time to find out what is wrong :)

claudep commented 4 years ago

https://github.com/django-import-export/django-import-export/pull/1061 is intented to fix the problem.