0

I am trying to pip install ibmdbpy and I am getting the following syntax error:

# pip install --pre ibmdbpy
Downloading/unpacking ibmdbpy
Downloading ibmdbpy-0.1.0b26-py2.py3-none-any.whl (153kB): 153kB downloaded
Requirement already satisfied (use --upgrade to upgrade): numpy in /usr/lib/python2.7/dist-packages (from ibmdbpy)
Requirement already satisfied (use --upgrade to upgrade): pandas in /usr/lib/python2.7/dist-packages (from ibmdbpy)
Requirement already satisfied (use --upgrade to upgrade): six in /usr/lib/python2.7/dist-packages (from ibmdbpy)
Requirement already satisfied (use --upgrade to upgrade): future in /usr/local/lib/python2.7/dist-packages (from ibmdbpy)
Requirement already satisfied (use --upgrade to upgrade): lazy in /usr/local/lib/python2.7/dist-packages (from ibmdbpy)
Requirement already satisfied (use --upgrade to upgrade): pypyodbc in /usr/local/lib/python2.7/dist-packages (from ibmdbpy)
Requirement already satisfied (use --upgrade to upgrade): python-dateutil in /usr/lib/python2.7/dist-packages (from pandas->ibmdbpy)
Requirement already satisfied (use --upgrade to upgrade): pytz>=2011k in /usr/lib/python2.7/dist-packages (from pandas->ibmdbpy)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python2.7/dist-packages (from pypyodbc->ibmdbpy)
Installing collected packages: ibmdbpy
Compiling /tmp/pip-build-AqhW1S/ibmdbpy/ibmdbpy/benchmark/benchmark.py ...
SyntaxError: unqualified exec is not allowed in function 'run' because it contains a nested function with free variables (benchmark.py, line 184)

Successfully installed ibmdbpy
Cleaning up...

It says successfully installed but is it really given the syntax error?

webe3
  • 103
  • 1
  • 8

2 Answers2

0

The syntax error is with benchmark.py. I assume this is a benchmarking script and not critical to the driver's operation. In the past I've found that you can get some errors installing python modules and if it says successful, you are ok.

Raj
  • 544
  • 2
  • 10
0

Indeed, the benchmark.py does not contain any critical function. It has been used internally only to assess the scalability of various statistical functions.

If the install was successful, it should be ok !

However, thank you for notifying the error. It seems this is due to a difference in the exec function between Python 2.X and 3.X. We are going to provide a patch for it. Should be solved in the next version !