diff --git a/utils/rapids-colab.sh b/utils/rapids-colab.sh index e28b3961..fcd24f43 100644 --- a/utils/rapids-colab.sh +++ b/utils/rapids-colab.sh @@ -36,11 +36,11 @@ if (( $RAPIDS_RESULT >= 11 )) ;then echo "!wget -nc https://raw.githubusercontent.com/rapidsai/notebooks-contrib/master/utils/rapids-colab.sh" echo "!bash rapids-colab.sh" echo "import sys, os" - echo "dist_package_index = sys.path.index\('/usr/local/lib/python3.6/dist-packages'\)" + echo "dist_package_index = sys.path.index('/usr/local/lib/python3.6/dist-packages')" echo "sys.path = sys.path[:dist_package_index] + ['/usr/local/lib/python3.6/site-packages'] + sys.path[dist_package_index:]" echo "sys.path" - echo "if os.path.exists\('update_pyarrow.py'\): ## Only exists if RAPIDS version is 0.11 or higher" - echo " exec\(open\('update_pyarrow.py'\).read\(\), globals\(\)\)" + echo "if os.path.exists('update_pyarrow.py'): ## Only exists if RAPIDS version is 0.11 or higher" + echo " exec(open('update_pyarrow.py').read(), globals())" echo "********************************************************************************************************" echo "Do you have the above version of the script running in your cell? (Y/N)" read response @@ -56,11 +56,11 @@ if (( $RAPIDS_RESULT >= 11 )) ;then echo "!wget -nc https://raw.githubusercontent.com/rapidsai/notebooks-contrib/master/utils/rapids-colab.sh" echo "!bash rapids-colab.sh" echo "import sys, os" - echo "dist_package_index = sys.path.index\('/usr/local/lib/python3.6/dist-packages'\)" + echo "dist_package_index = sys.path.index('/usr/local/lib/python3.6/dist-packages')" echo "sys.path = sys.path[:dist_package_index] + ['/usr/local/lib/python3.6/site-packages'] + sys.path[dist_package_index:]" echo "sys.path" - echo "if os.path.exists\('update_pyarrow.py'\): ## Only exists if RAPIDS version is 0.11 or higher" - echo " exec\(open\('update_pyarrow.py'\).read\(\), globals\(\)\)" + echo "if os.path.exists('update_pyarrow.py'): ## Only exists if RAPIDS version is 0.11 or higher" + echo " exec(open('update_pyarrow.py').read(), globals())" echo "********************************************************************************************************" rm rc2.sh echo "Please COPY the above code and RERUN the cell"