Failed install robotframework-datadriver XLS

Hi all,
I work with:

  • MAC OS
  • PyCharm 2021.2 (Community Edition)
  • Python 3.9

I tried to install robotframework-datadriver to work with XLSX file by both 2 command lines:

  1. pip3 install -U robotframework-datadriver[XLS]
    [Return error]: zsh: no matches found: robotframework-datadriver[XLS]

  2. pip3 install --upgrade robotframework-datadriver XLS
    [Return error]:

Requirement already satisfied: robotframework-datadriver in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (1.5.0)
Collecting XLS
Using cached xls-0.1.1.tar.gz (58 kB)
Requirement already satisfied: Pygments in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from robotframework-datadriver) (2.10.0)
Requirement already satisfied: robotframework>=3.1 in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from robotframework-datadriver) (4.1)
Requirement already satisfied: docutils in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (from robotframework-datadriver) (0.17.1)
Collecting PyV8
Using cached PyV8-0.5.zip (22 kB)
Using legacy β€˜setup.py install’ for XLS, since package β€˜wheel’ is not installed.
Using legacy β€˜setup.py install’ for PyV8, since package β€˜wheel’ is not installed.
Installing collected packages: PyV8, XLS
Running setup.py install for PyV8 … error
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c β€˜import io, os, sys, setuptools, tokenize; sys.argv[0] = β€˜"’"’/private/var/folders/gd/cq0zyf9927s9dndm5h9yr4b00000gn/T/pip-install-qykhdag9/pyv8_9a5555be0028455891cd21ca665650fa/setup.pyβ€™β€œ'β€β€˜; file=β€™β€œ'β€β€˜/private/var/folders/gd/cq0zyf9927s9dndm5h9yr4b00000gn/T/pip-install-qykhdag9/pyv8_9a5555be0028455891cd21ca665650fa/setup.pyβ€™β€œ'β€β€˜;f = getattr(tokenize, β€˜"β€™β€œβ€˜openβ€™β€β€™β€œβ€˜, open)(file) if os.path.exists(file) else io.StringIO(β€™β€β€˜β€œβ€˜from setuptools import setup; setup()β€™β€β€™β€œβ€˜);code = f.read().replace(β€™β€β€˜"’\r\nβ€™β€œ'β€β€˜, β€˜"’"’\nβ€™β€œ'β€β€˜);f.close();exec(compile(code, file, β€˜"β€™β€œβ€˜execβ€™β€β€™β€œβ€˜))’ install --record /private/var/folders/gd/cq0zyf9927s9dndm5h9yr4b00000gn/T/pip-record-xhsftvi0/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/PyV8
cwd: /private/var/folders/gd/cq0zyf9927s9dndm5h9yr4b00000gn/T/pip-install-qykhdag9/pyv8_9a5555be0028455891cd21ca665650fa/
Complete output (17 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-universal2-3.9
copying PyV8.py β†’ build/lib.macosx-10.9-universal2-3.9
running build_ext
building β€˜_PyV8’ extension
creating build/temp.macosx-10.9-universal2-3.9
creating build/temp.macosx-10.9-universal2-3.9/src
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -DBOOST_PYTHON_STATIC_LIB -Ilib/python/inc -Ilib/boost/inc -Ilib/v8/inc -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/Context.cpp -o build/temp.macosx-10.9-universal2-3.9/src/Context.o
In file included from src/Context.cpp:1:
src/Context.h:5:10: fatal error: β€˜boost/shared_ptr.hpp’ file not found
#include <boost/shared_ptr.hpp>
^~~~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command β€˜/usr/bin/gcc’ failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = 'β€β€˜"’/private/var/folders/gd/cq0zyf9927s9dndm5h9yr4b00000gn/T/pip-install-qykhdag9/pyv8_9a5555be0028455891cd21ca665650fa/setup.pyβ€™β€œ'β€β€˜; file=β€™β€œ'β€β€˜/private/var/folders/gd/cq0zyf9927s9dndm5h9yr4b00000gn/T/pip-install-qykhdag9/pyv8_9a5555be0028455891cd21ca665650fa/setup.pyβ€™β€œ'β€β€˜;f = getattr(tokenize, β€˜"β€™β€œβ€˜openβ€™β€β€™β€œβ€˜, open)(file) if os.path.exists(file) else io.StringIO(β€™β€β€˜β€œβ€˜from setuptools import setup; setup()β€™β€β€™β€œβ€˜);code = f.read().replace(β€™β€β€˜"’\r\nβ€™β€œ'β€β€˜, β€˜"’"’\nβ€™β€œ'β€β€˜);f.close();exec(compile(code, file, β€˜"β€™β€œβ€˜exec’”’"β€˜))’ install --record /private/var/folders/gd/cq0zyf9927s9dndm5h9yr4b00000gn/T/pip-record-xhsftvi0/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.9/include/python3.9/PyV8 Check the logs for full command output.

You need a space between the package and the [package index options]. As in

pip3 install robotframework-datadriver [XLS]

This still may produce the error seen on the second (which is trying to install data driver plus another package called XLS - not what you are wanting to do as far as I can tell).

On MacOS and ZSH, you have to call

pip install robotframework-datadriver\[XLS]

Because square brackets do have a meaning in ZSH you have to escape them.

3 Likes

Thanks @RenΓ©

I have the similar issue about installing robotframework-datadriver[XLS]. I see robotframework-datadriver[XLS] is skipped to install package and wasn’t in the list of package (pip list). How I solve this problem?