diff --git a/paddle/scripts/paddle_build.bat b/paddle/scripts/paddle_build.bat index 36154b23f3f12aa2a11874104fed0967edbb4215..326da03b0b90c6c4b371ce559fad42e508cb0ab1 100644 --- a/paddle/scripts/paddle_build.bat +++ b/paddle/scripts/paddle_build.bat @@ -88,7 +88,6 @@ set UPLOAD_TP_FILE=OFF rem ------initialize set git config------ git config --global core.longpaths true - rem ------initialize the python environment------ set PYTHON_EXECUTABLE=%PYTHON_ROOT%\python.exe set PATH=%PYTHON_ROOT%\Scripts;%PYTHON_ROOT%;%PATH% diff --git a/python/paddle/fluid/tests/unittests/test_corr.py b/python/paddle/fluid/tests/unittests/test_corr.py index 99fd21c047b077c2a20c002f72907c29c084797d..1e1dd3b3695840fbacc52212c8038d816b495510 100644 --- a/python/paddle/fluid/tests/unittests/test_corr.py +++ b/python/paddle/fluid/tests/unittests/test_corr.py @@ -18,9 +18,15 @@ import numpy as np import six import paddle import warnings +import sys + +np_minor_version = int((np.__version__).split('.')[1]) def numpy_corr(np_arr, rowvar=True, dtype='float64'): + # np.corrcoef support parameter 'dtype' since 1.20 + if np_minor_version < 20: + return np.corrcoef(np_arr, rowvar=rowvar) return np.corrcoef(np_arr, rowvar=rowvar, dtype=dtype) diff --git a/python/unittest_py/requirements.txt b/python/unittest_py/requirements.txt index ffc4fde7c27d15f36154b6ae485eac9803b6e004..7a48ff0148e76c67c83a8f8ec9040c2a59713761 100644 --- a/python/unittest_py/requirements.txt +++ b/python/unittest_py/requirements.txt @@ -1,3 +1,4 @@ +pynacl==1.4.0 ; python_version == "3.6" PyGithub coverage==5.5 pycrypto ; platform_system != "Windows" @@ -8,7 +9,8 @@ hypothesis opencv-python<=4.2.0.32 visualdl paddle2onnx>=0.8.2 -scipy>=1.6 +scipy>=1.6; python_version >= "3.7" +scipy>=1.5; python_version == "3.6" prettytable distro -numpy>=1.20,<1.22 +numpy>=1.20,<1.22; python_version >= "3.7"