fix paddle pip install package version

release/0.10.0
Helin Wang 8 years ago
parent a71218c91c
commit cebc13a37c

@ -94,16 +94,22 @@ else:
EOF 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."
BASEDIR=$(dirname "$0") # setuptools normalizes package version, so we need to use normalized
pip install ${BASEDIR}/../opt/paddle/share/wheels/*-@PADDLE_VERSION@-*.whl # package version for paddle python package
if [ $? -ne 0 ]; then PYTHON_PADDLE_VERSION=$(python -c 'import packaging
echo "pip install wheels failed. " import setuptools
echo "Please use 'sudo paddle' at the first time you use PaddlePaddle" print str(packaging.version.Version("@PADDLE_VERSION@"))
echo "PaddlePaddle will install some python dependencies automatically." ' 2>/dev/null)
exit 1 BASEDIR=$(dirname "$0")
fi pip install ${BASEDIR}/../opt/paddle/share/wheels/*-${PYTHON_PADDLE_VERSION}-*.whl
echo "Python dependencies are installed." if [ $? -ne 0 ]; then
echo "pip install wheels failed. "
echo "Please use 'sudo paddle' at the first time you use PaddlePaddle"
echo "PaddlePaddle will install some python dependencies automatically."
exit 1
fi
echo "Python dependencies are installed."
fi fi
case "$1" in case "$1" in

Loading…
Cancel
Save