diff --git a/paddle/scripts/run_python_tests.sh b/paddle/scripts/run_python_tests.sh index 6dfc05a9497343d4cd9d0f03a7a96f475f3d1623..1ed497aaeccdb629181809a0cbc48abb57ae4c44 100755 --- a/paddle/scripts/run_python_tests.sh +++ b/paddle/scripts/run_python_tests.sh @@ -24,6 +24,8 @@ PYTHON=$1; shift if [ $USE_VIRTUALENV_FOR_TEST -ne 0 ]; then rm -rf .test_env virtualenv .test_env + unset PYTHONHOME + unset PYTHONPATH source .test_env/bin/activate PYTHON=python fi @@ -32,6 +34,8 @@ $PYTHON -m pip install $SCRIPTPATH/../dist/*.whl if [ "X${PADDLE_PACKAGE_DIR}" != "X" ]; then $PYTHON -m pip install ${PADDLE_PACKAGE_DIR}/*.whl +else + export PYTHONPATH=$SCRIPTPATH/../../python/ fi $PYTHON -m pip install ipython==5.3