Question

I installed ipdb using pip, but I am still getting

ImportError: No module named ipdb.

Do I have to do something else to bring this module in? Of course, I import ipdb at the top of my file as well. My thinking is this: I have Python 2.7 and Python 3 installed. Pip installed ipdb to the Python 2.7 directory, but the Python module I am running is using Python 3. I think this is the issue, but how can I resolve it, so that ipdb can be used with my Python 3 module? Thanks!

Était-ce utile?

La solution

From https://stackoverflow.com/a/12262143/3694

  1. Install package python3-setuptools: run sudo aptitude install python3-setuptools, this will give you the command easy_install3.
  2. Install pip using Python 3's setuptools: run sudo easy_install3 pip, this will give you the command pip-3.2.
  3. Install your PyPI packages: run sudo pip-3.2 install <package> (installing python packages into your base system requires root, of course).
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top