Install ipdb for Python 3? [duplicate]

北慕城南 提交于 2020-01-01 14:21:05

问题


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!


回答1:


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).


来源:https://stackoverflow.com/questions/17242207/install-ipdb-for-python-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!