pip install staty

ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "", line 1, in 
File "/tmp/pip-install-x6tqlpp5/staty/setup.py", line 79
download_url=f'https://github.com/osantana/staty/tarball/{version}',
SyntaxError: invalid syntax
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-x6tqlpp5/staty/

======================

使用

pip install staty==1.0.0

 

 

运行   labelImg还是报错,

Botaos-MacBook-Pro:staty-1.2.3 botaogu$ labelImg
Traceback (most recent call last):
File "/Applications/anaconda/bin/labelImg", line 7, in <module>
from labelImg.labelImg import main
File "/Applications/anaconda/lib/python3.5/site-packages/labelImg/labelImg.py", line 29, in <module>
import resources
File "/Applications/anaconda/lib/python3.5/site-packages/resources/__init__.py", line 1, in <module>
from .resource import Resource # noqa
File "/Applications/anaconda/lib/python3.5/site-packages/resources/resource.py", line 1, in <module>
from .client import ResourceClient
File "/Applications/anaconda/lib/python3.5/site-packages/resources/client.py", line 2, in <module>
from staty.exceptions import (
File "/Applications/anaconda/lib/python3.5/site-packages/staty/__init__.py", line 15, in <module>
from .base import * # noqa: F403,F401
File "/Applications/anaconda/lib/python3.5/site-packages/staty/base.py", line 87
return f"{self.code} {self.message}"

 

然后找到   vim   /Applications/anaconda/lib/python3.5/site-packages/staty/base.py     87行,修改为:

def __str__(self):
  #return f"{self.code} {self.message}"
  return "{self.code} {self.message}"

 

posted @ 2019-05-15 21:31  西北逍遥  阅读(608)  评论(0编辑  收藏  举报