Error when installing p4python on osx-MountainLion
-
27-06-2021 - |
Pergunta
I have Python version: 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
downloaded p4python from http://www.perforce.com/product/components/apis#p4python
tar -zxvf ./p4python.tgz
downloaded p4api from ftp://ftp.perforce.com/perforce/r12.1/bin.darwin90x86_64
tar -zxvf ./p4api.tgz
placed extracted files into p4python directory
Then I run:
sudo python ./setup.py build --apidir ./p4api
I get the following error:
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
Any ideas?
Solução
edit setup.py, change below:
elif unameOut[2][0:2] in ("10", "11") :
to
elif unameOut[2][0:2] in ("10", "11", "12") :
cause uname -a
we got 12.10 on mountain lion
Darwin csjteki-MacBook-Pro.local 12.1.0 Darwin Kernel Version 12.1.0: Tue Aug 14 13:29:55 PDT 2012; root:xnu-2050.9.2~1/RELEASE_X86_64 x86_64
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow