You can cd to YOUR_ENV/lib/pythonxx/site-packages/ and have a look, but is there any convenient ways?
cd
YOUR_ENV/lib/pythonxx/site-packages/
pip freeze list all the packages installed including the system environment's.
pip freeze
You can list only packages in the virtualenv by pip freeze --local or pip list --local. This option works irrespective of whether you have global site packages visible in the virtualenv.
virtualenv
pip freeze --local
pip list --local
Note that restricting the virtualenv to not use global site packages isn't the answer to the problem, because the question is on how to separate the two lists, not how to constrain our workflow to fit limitations of tools.
Credits to @gvalkov's comment here. Cf. also this issue.
1.4m articles
1.4m replys
5 comments
57.0k users