0

我正在尝试 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...

它说安装成功,但它真的给出了语法错误吗?

4

2 回答 2

0

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

于 2016-06-13T21:13:23.827 回答
0

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

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

但是,感谢您通知错误。这似乎是由于execPython 2.X 和 3.X 之间的功能不同所致。我们将为它提供一个补丁。下个版本应该会解决!

于 2016-06-14T09:24:17.613 回答