install 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/sh
  2. echo "* Checking dependencies..."
  3. echo " > Looking for python 3..."
  4. if [ -z "$(command -v python3)" ]; then
  5. echo "[!] python 3 executable not found. Installing python 3 and pip..."
  6. if [ -f "/etc/debian_version" ]; then
  7. sudo apt install python3.6 python3-pip
  8. elif [ -f "/etc/redhat-release" ]; then
  9. sudo yum install -y python36
  10. sudo yum install -y python36-setuptools
  11. else
  12. echo "[x] couldn't detect your OS distribution. Please install python 3 manually and try again."
  13. exit 1
  14. fi
  15. else
  16. echo " Found."
  17. fi
  18. echo " > Looking for pip 3..."
  19. if [ -z "$(command -v pip3)" ]; then
  20. echo "[!] pip 3 executable not found. Installing it..."
  21. if [ -f "/etc/debian_version" ]; then
  22. sudo apt install python3-pip
  23. elif [ -f "/etc/redhat-release" ]; then
  24. sudo yum install -y python36-setuptools
  25. else
  26. echo "[x] Couldn't detect your OS distribution. Please install pip for python 3 manually and try again."
  27. exit 1
  28. fi
  29. else
  30. echo " Found."
  31. fi
  32. echo " > nci2 also requires the markdown and sortedcontainers python modules to be installed, pip3 will try to install them if they're missing."
  33. echo "* Dependencies OK."
  34. echo "* Installing nci2..."
  35. pip3 install -e .