Skip to content
Advertisement

Running bpython inside a virtualenv

I have created a virtualenv and installed SQLAlchemy in it:

JavaScript

import works in python:

JavaScript

But it does not work in bpython:

JavaScript

Why can’t bpython find the package installed in the virtualenv, even though it is executed after source alchemy/bin/activate is called?

Advertisement

Answer

bpython must be installed in the virtualenv, otherwise the external, system-wide bpython is called:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement