未验证 提交 fa8c755a 编写于 作者: S Sing_chan 提交者: GitHub

【CI】support py3.6 in windows-ci pipeline (#42711)

* set scipy and numpy version suit for py3.6

* pynacl1.5.0 which is needed by PyGithub built failed in python36, change it to 1.4.0 also works;test=document_fix;test=windows_ci

* np.corrcoef support parameter since 1.20

* delete test code
上级 29a0a8e2
...@@ -88,7 +88,6 @@ set UPLOAD_TP_FILE=OFF ...@@ -88,7 +88,6 @@ set UPLOAD_TP_FILE=OFF
rem ------initialize set git config------ rem ------initialize set git config------
git config --global core.longpaths true git config --global core.longpaths true
rem ------initialize the python environment------ rem ------initialize the python environment------
set PYTHON_EXECUTABLE=%PYTHON_ROOT%\python.exe set PYTHON_EXECUTABLE=%PYTHON_ROOT%\python.exe
set PATH=%PYTHON_ROOT%\Scripts;%PYTHON_ROOT%;%PATH% set PATH=%PYTHON_ROOT%\Scripts;%PYTHON_ROOT%;%PATH%
......
...@@ -18,9 +18,15 @@ import numpy as np ...@@ -18,9 +18,15 @@ import numpy as np
import six import six
import paddle import paddle
import warnings import warnings
import sys
np_minor_version = int((np.__version__).split('.')[1])
def numpy_corr(np_arr, rowvar=True, dtype='float64'): 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) return np.corrcoef(np_arr, rowvar=rowvar, dtype=dtype)
......
pynacl==1.4.0 ; python_version == "3.6"
PyGithub PyGithub
coverage==5.5 coverage==5.5
pycrypto ; platform_system != "Windows" pycrypto ; platform_system != "Windows"
...@@ -8,7 +9,8 @@ hypothesis ...@@ -8,7 +9,8 @@ hypothesis
opencv-python<=4.2.0.32 opencv-python<=4.2.0.32
visualdl visualdl
paddle2onnx>=0.8.2 paddle2onnx>=0.8.2
scipy>=1.6 scipy>=1.6; python_version >= "3.7"
scipy>=1.5; python_version == "3.6"
prettytable prettytable
distro distro
numpy>=1.20,<1.22 numpy>=1.20,<1.22; python_version >= "3.7"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册