1

I used the sudo apt-get install bpython command to install bpython. Now when I type bpython, I get an error:

Traceback (most recent call last):
File "/usr/bin/bpython", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2749, in <module>
working_set = WorkingSet._build_master()
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 444, in _build_master
ws.require(__requires__)
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 725, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 628, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: bpython==0.12
  • 2
    Did you report the problem to the maintainers of your distribution? – lcd047 Jun 21 '15 at 4:21
1

The short answer is uninstall from the package sudo apt-get remove bpython and install via pip: sudo pip install bpython.

I think what's going on is that the bpython package assumes python 2.7 in /usr/bin/python, but from the traceback, your /usr/bin/python seems to be python3.

To verify try running /usr/bin/python -V to see the version and compare with the output of dpkg -L bpython where you might see stuff like: /usr/lib/python2.7/dist-packages/bpython/args.py

If that all is the case then, yes, you may also want to report this to the distribution maintainers so they can fix the package.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.