提交 5797e613 编写于 作者: W wuzewu

Fix setup bug

上级 b0aecea2
...@@ -19,16 +19,11 @@ from __future__ import print_function ...@@ -19,16 +19,11 @@ from __future__ import print_function
import platform import platform
import six
from setuptools import find_packages from setuptools import find_packages
from setuptools import setup from setuptools import setup
from paddlehub.version import hub_version
def python_version():
return [int(v) for v in platform.python_version().split(".")]
from paddlehub.version import hub_version
max_version, mid_version, min_version = python_version()
REQUIRED_PACKAGES = [ REQUIRED_PACKAGES = [
'six >= 1.10.0', 'protobuf >= 3.6.0', 'pyyaml', 'Pillow', 'requests', 'six >= 1.10.0', 'protobuf >= 3.6.0', 'pyyaml', 'Pillow', 'requests',
...@@ -36,7 +31,7 @@ REQUIRED_PACKAGES = [ ...@@ -36,7 +31,7 @@ REQUIRED_PACKAGES = [
'sentencepiece', 'nltk', 'colorlog', 'opencv-python' 'sentencepiece', 'nltk', 'colorlog', 'opencv-python'
] ]
if max_version < 3: if six.PY2:
REQUIRED_PACKAGES += ["numpy < 1.17.0", "pandas < 0.25.0"] REQUIRED_PACKAGES += ["numpy < 1.17.0", "pandas < 0.25.0"]
else: else:
REQUIRED_PACKAGES += ["numpy", "pandas"] REQUIRED_PACKAGES += ["numpy", "pandas"]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册