无法安装Python
我试图在运行Python2.7.5的freebsd上安装p4python。 我得到以下错误无法安装Python,python,perforce,p4python,Python,Perforce,P4python,我试图在运行Python2.7.5的freebsd上安装p4python。 我得到以下错误 Using cached p4python-2016.1.1447008.tar.gz Complete output from command python setup.py egg_info: Attempting to load API from ftp.perforce.com Traceback (most recent call last): File "&
Using cached p4python-2016.1.1447008.tar.gz
Complete output from command python setup.py egg_info:
Attempting to load API from ftp.perforce.com
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-WK9yDa/p4python/setup.py", line 611, in <module>
p4_api_dir = get_api_dir()
File "/tmp/pip-build-WK9yDa/p4python/setup.py", line 532, in get_api_dir
p4ftp = P4APIFtp()
File "/tmp/pip-build-WK9yDa/p4python/setup.py", line 65, in __init__
self.platform = self.findPlatform
File "/tmp/pip-build-WK9yDa/p4python/setup.py", line 105, in findPlatform
release = uname.release
AttributeError: 'tuple' object has no attribute 'release'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-WK9yDa/p4python/
使用缓存的p4python-2016.1.1447008.tar.gz
从命令python setup.py egg_info完成输出:
试图从ftp.perforce.com加载API
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
文件“/tmp/pip-build-WK9yDa/p4python/setup.py”,第611行,在
p4_api_dir=get_api_dir()
get_api_dir中的文件“/tmp/pip-build-WK9yDa/p4python/setup.py”,第532行
p4ftp=p4apipftp()
文件“/tmp/pip-build-WK9yDa/p4python/setup.py”,第65行,在__
self.platform=self.findpplatform
findPlatform中的文件“/tmp/pip-build-WK9yDa/p4python/setup.py”,第105行
release=uname.release
AttributeError:“tuple”对象没有属性“release”
----------------------------------------
命令“python setup.py egg_info”在/tmp/pip-build-WK9yDa/p4python中失败,错误代码为1/
我尝试过更新setutools…但安装失败。有什么帮助吗?这是Python3.x与Python2.x的问题。在Python2.x上,platform.uname()返回一个常规元组。在Python3.x上,platform.uname()返回一个namedtuple
要解决此问题,请在
tools/P4APIFtp.py
中,将uname.release
更改为uname[2]
这是Python 3.x与Python 2.x的问题。在Python2.x上,platform.uname()返回一个常规元组。在Python3.x上,platform.uname()返回一个namedtuple
要解决此问题,请在
tools/p4apipftp.py
中,将uname.release
更改为uname[2]
到FreeBsd 10.3p11/Python 2.7.13为止,仍然存在问题?到FreeBsd 10.3p11/Python 2.7.13为止,仍然存在问题吗?