Install a module using pip for specific python version

后端 未结 14 805
迷失自我
迷失自我 2020-11-22 17:14

On Ubuntu 10.04 by default Python 2.6 is installed, then I have installed Python 2.7. How can I use pip install to install packages for Python 2.7.

For

14条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-22 17:45

    I faced a similar problem with another package called Twisted. I wanted to install it for Python 2.7, but it only got installed for Python 2.6 (system's default version).

    Making a simple change worked for me.

    When adding Python 2.7's path to your $PATH variable, append it to the front like this: PATH=/usr/local/bin:$PATH, so that the system uses that version.

    If you face more problems, you can follow this blog post which helped me - https://github.com/h2oai/h2o-2/wiki/installing-python-2.7-on-centos-6.3.-follow-this-sequence-exactly-for-centos-machine-only

提交回复
热议问题