2014年12月24日星期三

Installing python packages-- the easy way.












Installing a python package --the easy way

Installing a python package --the easy way

There are some package management tool, easy_install, pip.etc. These tools can help you install and uninstall package easily. Following the steps:
1.Download setuptools from the following link:
https://pypi.python.org/pypi/setuptools#unix-including-mac-os-x-curl
2.uninstall the package you downloaded.
  1. Open you commandline: cd /the/place/setup.py in
  2. sudo python setup.py install
Then you will be asked to type your computer password
  1. The setuptools had been installed.
There something to clarify, the default packages install path are under python version 2.7 for me. It is possible that you have the same setting of mine. In this case, once you install a package, say statlab, you can only do access that package in pyton 2.7 IDLE.
  1. Then you can use easy_install to make you life easier. The first package that I recommend you to install is pip. The reason I like it because it provide you a function to uninstall package much easier than do that py easy_install.
  2. sudo easy_install statlab

  1. you can use statlab in python IDLE 2.7 but not for version 3.4.

  1. using sudo easy_install statlab to install pip. Then using pip to uninstall statlab

That's it.