I'm using PyCharm. When I press the run button, my file runs fine:
But when I try to run the same file in my virtualenv, nothing happens:
My interpreter settings are set to the virtualenv, so what else could be wrong?
I'm using PyCharm. When I press the run button, my file runs fine:
But when I try to run the same file in my virtualenv, nothing happens:
My interpreter settings are set to the virtualenv, so what else could be wrong?
Mac users:
The answer was that python3 wasn't using the same site-packages as the virtualenv; and thusly, running
python3 run.py
would not run.Ensure that you're running the virtualenv's python binary instead of the generally installed python3 binary.
Windows users:
There is no Python on Windows by default. And therefore any version that you've installed is just python (I guess). The recommended way to manage multiple python versions is to use the Python launcher. Source