Advertisement
Guest User

Untitled

a guest
Feb 28th, 2020
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. #########################################
  4. # Installing python and necessary packages
  5. # locally. This script will install python
  6. # into the ~/local/bin directory and install
  7. # numpy + scipy
  8. #########################################
  9.  
  10. # installing python 2.7.3
  11. mkdir -p ~/local
  12. wget https://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz
  13. tar xvzf Python-2.7.3.tgz
  14. cd Python-2.7.3
  15. ./configure
  16. make
  17. make altinstall prefix=~/local # specify local installation directory
  18. ln -s ~/local/bin/python2.7 ~/local/bin/python
  19. cd ..
  20.  
  21. # install setuptools and pip for package management
  22. wget https://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz#md5=7df2a529a074f613b509fb44feefe74e
  23. tar xvzf setuptools-0.6c11.tar.gz
  24. cd setuptools-0.6c11
  25. ~/local/bin/python setup.py install # specify the path to the python you installed above
  26. cd ..
  27. wget https://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz#md5=db8a6d8a4564d3dc7f337ebed67b1a85
  28. tar xvzf pip-1.2.1.tar.gz
  29. cd pip-1.2.1
  30. ~/local/bin/python setup.py install # specify the path to the python you installed above
  31.  
  32. # Now you can install other packages using pip
  33. ~/local/bin/pip install numpy # install numpy
  34. ~/local/bin/pip install scipy
  35.  
  36. ~/local/bin/pip freeze # to check python module version info
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement