0

I am totally confused on the relation between pip and python versions. I am using ubuntu 15.10

I gave locate /usr/bin/pip I have got the following response.

/usr/bin/pip
/usr/bin/pip2
/usr/bin/pip3

I installed pyLDAvis module using- pip install pyldavis But I never see pyldavis module in pip list and when I say import pyLDAvis it throws me error saying no module named pyLDAvis

After spending much time I have found this module in pip2 list.

  1. When I installed it using pip why did it install for python2.7 and why it's located in pip2 list and why not in pip list?
  2. If we have only 2 python versions- python 2.x(pip2) and python 3.x(pip3) what's all this confusion with three executables for python and pip each- python, python2.7, python3.5 and pip, pip2, pip3? Please provide any background information and the main reason for this.
  3. My existing python scripts are unable to run because the module is accessible by python2.7 and not by python Do I now need to point(using symbolic link) python to python2.7 ? If yes do I need to install all the modules that I have installed using pip again with pip2 so that pip2 list has all the modules that were there for pip list earlier?
Uday Sagar
  • 480
  • 2
  • 4
  • 15
  • Can you do `ls -l /usr/bin/{pip,python}*` and tell us what it says? – edwinksl Jul 24 '16 at 03:47
  • Try this [answer](http://stackoverflow.com/a/37586175/6598100) (from a related question); your pip can apparently point to the wrong Python. That might be a partial answer, for number 1 on your list. – wirefox Jul 24 '16 at 03:51
  • It gave me a long list https://drive.google.com/file/d/0B9LZHER5HBszN1RjVnJhUFN1MkU/view?usp=sharing – Uday Sagar Jul 24 '16 at 03:54
  • I have multiple versions of Python installed (system 2 and 3, plus others), and I never use the `pip` command, because, depending on which version of Python upgraded pip (the module) last, it could point anywhere. Instead, use `pip2` for Python 2, `pip3` for Python 3. You somehow have Python 3.4 and 3.5 installed, so you'll need to examine the first line of `/usr/bin/pip3` to see which version it's pointing to. – MattDMo Jul 24 '16 at 04:25

0 Answers0