Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
864 views
in Technique[技术] by (71.8m points)

importerror - I am getting error message "SyntaxError: invalid syntax" when trying importing any python package

I am trying to import agateexcel package to automate some excel related work. But when I tried to import agateexcel package it displayed error message. I have the agateexcel package in the path "C:Python34Libsite-packages".

Below is the lines that cmd is comming up with when I am running "import agateexcel"

>>> import agateexcel
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:Python34libsite-packagesagateexcel\__init__.py", line 4, in <modul
e>
    import agateexcel.table_xlsx
  File "C:Python34libsite-packagesagateexcelable_xlsx.py", line 11, in <mo
dule>
    import openpyxl
  File "C:Python34libsite-packagesopenpyxl\__init__.py", line 6, in <module>

    from openpyxl.workbook import Workbook
  File "C:Python34libsite-packagesopenpyxlworkbook\__init__.py", line 4, in
 <module>
    from .workbook import Workbook
  File "C:Python34libsite-packagesopenpyxlworkbookworkbook.py", line 7, in
 <module>
    from openpyxl.worksheet.worksheet import Worksheet
  File "C:Python34libsite-packagesopenpyxlworksheetworksheet.py", line 396

    return f"{get_column_letter(min_col)}{min_row}:{get_column_letter(max_col)}{
max_row}"

        ^
SyntaxError: invalid syntax
>>>

Note: I am using Windows OS.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...