Hallo wieder!
Vielen Dank für den Hinweis... Ich verwendet Ubuntu 16.04

und habe jetzt mittels Anaconda auf die Python-Version 3.8 geupdatet. Und neben xls funktioniert jetzt auch xlsx. Aber mit ods-Dateien oder xls mit mehreren Arbeitsblättern habe ich weiterhin Schwierigkeiten.
Bei xls mit mehreren Arbeitsblättern erhalte ich folgenden Fehler:
Code: Alles auswählen
Traceback (most recent call last):
File "versuch.py", line 10, in <module>
datei = pandas.read_excel('TRG422.xls', sheet_name='PyExport1')
File "/home/matthiasm/anaconda3/lib/python3.8/site-packages/pandas/util/_decorators.py", line 299, in wrapper
return func(*args, **kwargs)
File "/home/matthiasm/anaconda3/lib/python3.8/site-packages/pandas/io/excel/_base.py", line 336, in read_excel
io = ExcelFile(io, storage_options=storage_options, engine=engine)
File "/home/matthiasm/anaconda3/lib/python3.8/site-packages/pandas/io/excel/_base.py", line 1131, in __init__
self._reader = self._engines[engine](self._io, storage_options=storage_options)
File "/home/matthiasm/anaconda3/lib/python3.8/site-packages/pandas/io/excel/_xlrd.py", line 25, in __init__
super().__init__(filepath_or_buffer, storage_options=storage_options)
File "/home/matthiasm/anaconda3/lib/python3.8/site-packages/pandas/io/excel/_base.py", line 391, in __init__
self.book = self.load_workbook(self.handles.handle)
File "/home/matthiasm/anaconda3/lib/python3.8/site-packages/pandas/io/excel/_xlrd.py", line 38, in load_workbook
return open_workbook(file_contents=data)
File "/home/matthiasm/anaconda3/lib/python3.8/site-packages/xlrd/__init__.py", line 172, in open_workbook
bk = open_workbook_xls(
File "/home/matthiasm/anaconda3/lib/python3.8/site-packages/xlrd/book.py", line 104, in open_workbook_xls
bk.parse_globals()
File "/home/matthiasm/anaconda3/lib/python3.8/site-packages/xlrd/book.py", line 1251, in parse_globals
self.names_epilogue()
File "/home/matthiasm/anaconda3/lib/python3.8/site-packages/xlrd/book.py", line 1045, in names_epilogue
evaluate_name_formula(self, nobj, namex, blah=blah)
File "/home/matthiasm/anaconda3/lib/python3.8/site-packages/xlrd/formula.py", line 1086, in evaluate_name_formula
assert len(stack) >= nargs
AssertionError
Hinsichtlich der odf-Dateien kommt folgender Fehler:
Code: Alles auswählen
Traceback (most recent call last):
File "versuch.py", line 6, in <module>
ods = pandas.read_excel('Tabelle.ods')
File "/home/matthiasm/anaconda3/lib/python3.8/site-packages/pandas/util/_decorators.py", line 299, in wrapper
return func(*args, **kwargs)
File "/home/matthiasm/anaconda3/lib/python3.8/site-packages/pandas/io/excel/_base.py", line 336, in read_excel
io = ExcelFile(io, storage_options=storage_options, engine=engine)
File "/home/matthiasm/anaconda3/lib/python3.8/site-packages/pandas/io/excel/_base.py", line 1131, in __init__
self._reader = self._engines[engine](self._io, storage_options=storage_options)
File "/home/matthiasm/anaconda3/lib/python3.8/site-packages/pandas/io/excel/_odfreader.py", line 30, in __init__
import_optional_dependency("odf")
File "/home/matthiasm/anaconda3/lib/python3.8/site-packages/pandas/compat/_optional.py", line 109, in import_optional_dependency
raise ImportError(msg) from None
ImportError: Missing optional dependency 'odfpy'. Use pip or conda to install odfpy.
Daraufhin hab ich mittel conda die Installation odfpy versucht, aber:
Code: Alles auswählen
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
- odfpy -> python[version='>=2.7,<2.8.0a0|>=3.5,<3.6.0a0']
- odfpy -> python[version='>=3.6,<3.7.0a0|>=3.7,<3.8.0a0']
Your python: python=3.8
If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.
The following specifications were found to be incompatible with your system:
- feature:/linux-64::__glibc==2.23=0
- python=3.8 -> libgcc-ng[version='>=7.5.0'] -> __glibc[version='>=2.17']
Your installed version is: 2.23
Anscheinend hab ich auch hier eine falsche Version.
Wäre fantastisch, wenn sich für beides eine Lösung fände
Danke!