0

I have installed a custom module (Twilio) using PIP, but when I try to import it, it will bring up:

ImportError: No module named 'twilio'

I'm running Windows 10 and Python 3.5. What am I missing? It seems to be an error with the paths. If it is, how do I set the paths?

Edit: I have my PYTHONHOME set to C:\Python33 and my PYTHONPATH set to C:Python33\Lib

linky00
  • 65
  • 1
  • 10

1 Answers1

1

First of all you need to check your package location.

pip show custom_package

Then check the system paths by

import sys
sys.path

If you dont' see your package path here, you can add it.

sys.path.append(custom_package_path)

If this doesn't work try reinstalling it. Or you can also install it with easy_install

dnit13
  • 2,478
  • 18
  • 35
  • Oh wow, turns out there's a whole different directory. I need to path back to the one I'm using. Thanks for the help, I hope this works! – linky00 Feb 13 '16 at 23:15
  • It worked! However, I need to append this at the top of all my programs. Is there a quick and dirty way of editing the path for all of my programs? – linky00 Feb 13 '16 at 23:23
  • @linky0064: Install it to one of the directories in `sys.path`, or use a [virtualenv](https://virtualenv.pypa.io/en/latest/). – Kevin Feb 13 '16 at 23:32