Pip install for both pythons

前端 未结 2 1635
感动是毒
感动是毒 2021-01-16 15:23

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

2条回答
  •  长情又很酷
    2021-01-16 15:39

    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

提交回复
热议问题