我有 Python 版本:Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
从http://www.perforce.com/product/components/apis#p4python下载 p4python
tar -zxvf ./p4python.tgz
从ftp://ftp.perforce.com/perforce/r12.1/bin.darwin90x86_64下载 p4api
tar -zxvf ./p4api.tgz
将提取的文件放入 p4python 目录
然后我运行:
sudo python ./setup.py build --apidir ./p4api
我收到以下错误:
API Release 2012.1
Traceback (most recent call last):
File "./setup.py", line 434, in <module>
do_setup(p4_api_dir, ssl)
File "./setup.py", line 349, in do_setup
info = PlatformInfo(apiVersion, releaseVersion, ssl != None)
File "./setup.py", line 279, in __init__
self.ID_OS = self.inStr(unix + release + platform)
UnboundLocalError: local variable 'release' referenced before assignment
有任何想法吗?