提交 cebc13a3 编写于 作者: H Helin Wang

fix paddle pip install package version

上级 a71218c9
...@@ -95,8 +95,14 @@ EOF ...@@ -95,8 +95,14 @@ EOF
if [ $? -eq 1 ]; then # Older version installed, or not installed at all if [ $? -eq 1 ]; then # Older version installed, or not installed at all
echo "First time run paddle, need to install some python dependencies." echo "First time run paddle, need to install some python dependencies."
# setuptools normalizes package version, so we need to use normalized
# package version for paddle python package
PYTHON_PADDLE_VERSION=$(python -c 'import packaging
import setuptools
print str(packaging.version.Version("@PADDLE_VERSION@"))
' 2>/dev/null)
BASEDIR=$(dirname "$0") BASEDIR=$(dirname "$0")
pip install ${BASEDIR}/../opt/paddle/share/wheels/*-@PADDLE_VERSION@-*.whl pip install ${BASEDIR}/../opt/paddle/share/wheels/*-${PYTHON_PADDLE_VERSION}-*.whl
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "pip install wheels failed. " echo "pip install wheels failed. "
echo "Please use 'sudo paddle' at the first time you use PaddlePaddle" echo "Please use 'sudo paddle' at the first time you use PaddlePaddle"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册