python unable to install open_excel module for ansible

35 views
Skip to first unread message

stack flow

unread,
Jul 14, 2020, 10:45:53 PM7/14/20
to Ansible Project
Hello,

I need open_excel module for ansible so that it can read multiple sheets in excel. I am getting following errors. how to fix it? I am using macbook os catalina.


ljames@mac ~ % pip3 install open_excel
Collecting open_excel
Requirement already satisfied: openpyxl in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from open_excel) (3.0.4)
Requirement already satisfied: jdcal in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from openpyxl->open_excel) (1.4.1)
Requirement already satisfied: et-xmlfile in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from openpyxl->open_excel) (1.0.1)
Installing collected packages: open-excel
  Running setup.py install for open-excel ... error
    ERROR: Command errored out with exit status 1:
     command: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/l8/gjnzx82j2fbd8dqjdxvmx7940000gn/T/pip-install-7rj4t72f/open-excel/setup.py'"'"'; __file__='"'"'/private/var/folders/l8/gjnzx82j2fbd8dqjdxvmx7940000gn/T/pip-install-7rj4t72f/open-excel/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/l8/gjnzx82j2fbd8dqjdxvmx7940000gn/T/pip-record-kl2pm_3e/install-record.txt --single-version-externally-managed --compile
         cwd: /private/var/folders/l8/gjnzx82j2fbd8dqjdxvmx7940000gn/T/pip-install-7rj4t72f/open-excel/
    Complete output (14 lines):
    /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/dist.py:474: UserWarning: Normalizing '0.101a' to '0.101a0'
      normalized_version,
    running install
    running build
    running build_py
    creating build
    creating build/lib
    creating build/lib/open_excel
    copying open_excel/search_excel.py -> build/lib/open_excel
    copying open_excel/__init__.py -> build/lib/open_excel
    copying open_excel/open_excel.py -> build/lib/open_excel
    running build_scripts
    creating build/scripts-3.7
    error: [Errno 21] Is a directory: 'open_excel'
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/l8/gjnzx82j2fbd8dqjdxvmx7940000gn/T/pip-install-7rj4t72f/open-excel/setup.py'"'"'; __file__='"'"'/private/var/folders/l8/gjnzx82j2fbd8dqjdxvmx7940000gn/T/pip-install-7rj4t72f/open-excel/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/l8/gjnzx82j2fbd8dqjdxvmx7940000gn/T/pip-record-kl2pm_3e/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
WARNING: You are using pip version 19.2.3, however version 20.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
ljames@mac ~ % cd Documents

Dick Visser

unread,
Jul 15, 2020, 5:56:50 AM7/15/20
to ansible...@googlegroups.com
Your best bet is to ask the author of that code:
https://pypi.org/user/mohamedosam/
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/ab9d3d3c-e83c-41a6-860a-de889e1f537do%40googlegroups.com.



--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

Udayendu kar

unread,
Jul 15, 2020, 6:04:52 AM7/15/20
to Ansible Project
You can use:

$ sudo  pip3 install openpyxl  -y

I am using this and its working perfectly. 

Reply all
Reply to author
Forward
0 new messages