1

I am doing a course on udacity where I need need to install twilio for python. I have sucessfully installed but still i get import error

Any pointers or help will be useful:

abhinav@abhinav-HP-Pavilion-dv5-Notebook-PC:~$ which -a python
/usr/local/bin/python
/usr/bin/python
abhinav@abhinav-HP-Pavilion-dv5-Notebook-PC:~$ which -a pip
/usr/bin/pip
abhinav@abhinav-HP-Pavilion-dv5-Notebook-PC:~$ pip freeze|grep twilio
Warning: cannot find svn location for distribute==0.6.24dev-r0
twilio==3.6.6
abhinav@abhinav-HP-Pavilion-dv5-Notebook-PC:~$ pip install --upgrade twilio
abhinav@abhinav-HP-Pavilion-dv5-Notebook-PC:~$ sudo pip install --upgrade twilio
abhinav@abhinav-HP-Pavilion-dv5-Notebook-PC:~$ python 
Python 2.7.6 (default, Mar 16 2014, 19:06:43) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
</code>
>>> import twilio
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named twilio
>>> 
Halvor Holsten Strand
  • 19,829
  • 17
  • 83
  • 99

1 Answers1

0

You have two python installs, your pip is pointing to /usr/bin so and your default python is in /usr/local/bin.

You can remove the /usr/bin/pip and install pip get-pip.py, which will use your now default /usr/local/bin/python.

It would probably be best to remove one of the python installs and set your paths accordingly. Just be careful when removing python, it can be detrimental to your system if you mess up your python install.

Padraic Cunningham
  • 176,452
  • 29
  • 245
  • 321