pip install ibmdbpy给出语法错误exec嵌套函数

时间:2016-06-13 18:31:46

标签: dashdb

我正在尝试pip install ibmdbpy,我收到以下语法错误:

# 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...

它表示已成功安装,但是它确实给出了语法错误吗?

2 个答案:

答案 0 :(得分:0)

语法错误与benchmark.py一致。我认为这是一个基准测试脚本,对驱动程序的操作并不重要。在过去,我发现你可以在安装python模块时遇到一些错误,如果说成功了,你就可以了。

答案 1 :(得分:0)

实际上,benchmark.py不包含任何关键功能。它仅在内部用于评估各种统计功能的可扩展性。

如果安装成功,那应该没问题!

但是,感谢您通知错误。这似乎是由于Python 2.X和3.X之间exec函数的差异。我们将为它提供一个补丁。应该在下一个版本中解决!