I'm new to pip and I've use it to install some module on my system, say pyglet, successfully. I have 2 versions of python, 2.7 and 3. When I use python3, pyglet works fine, but in python2, it tells me module pyglet not found.
How can I pip install to both of python2 and python3?
Thanks.
pip will only install to one python environment.
It sounds like pip has installed to your python3 environment and you need to install again to python2.
The pip script knows which python it is to installs for by the python in the #! line
To get a pip for your python 2 either there is already a pip2* script on your machine or you will need to install pip for python2
See this question for details about installing pip
I think what you need is virtualenv https://pypi.python.org/pypi/virtualenv . virtualenv is a tool to create isolated Python environments