One caution I have to observe is that packages installed out side the virtual environment can interfere in ways that make behaviors inside the virtual env very mysterious. For example, before I started using virtual environments seriously I had installed the
toxmodules in my base python install. A month or so afterwards I had created a new test environment and was doing
pip install -e .to test whether a package I was writing would install correctly on a fresh environment.
Everything installed fine, including an external package
Amy code needed. But, when I went to run
toxmy code errored out, claiming package
Ahad not been installed. BUT I CAN $%#@ SEE IT. LOOK, I TYPE
pip listAND THERE IT IS!
What was happening, is that I was picking up both
toxfrom the base environment, which did not have
Ainstalled. I lost some more hair over this. People who know me will confirm that I can't afford such hair loss.
As a rule, if you want to use virtual envs, it is best to have a bare install of Python and then not install anything on top of that outside of a virtual environment.