Install a module using pip for specific python version -
on ubuntu 10.04 default python 2.6 installed, have installed python 2.7. how can use pip install
install packages python 2.7.
for example:
pip install beautifulsoup4
by default installs beautifulsoup python 2.6
when do:
import bs4
in python 2.6 works, in python 2.7 says:
no module named bs4
use version of pip
installed against python instance want install new packages to.
in many distributions, there may separate python2.6-pip
, python2.7-pip
packages, invoked binary names such pip-2.6
, pip-2.7
. if pip not packaged in distribution desired target, might setuptools or easyinstall package, or use virtualenv (which include pip in generated environment).
pip's website includes installation instructions, if can't find within distribution.
Comments
Post a Comment