When I use the pip freeze command in cmd, I get a list of packages as expected, but if I run the same command in Powershell, nothing is returned:
pip freeze in cmd vs powershell
Why don't I get the same result in Powershell as I get in cmd?
When I use the pip freeze command in cmd, I get a list of packages as expected, but if I run the same command in Powershell, nothing is returned:
pip freeze in cmd vs powershell
Why don't I get the same result in Powershell as I get in cmd?
Ok, I found out what the problem was. It turns out pip was calling pip from Python 3.9 in cmd, and from 3.8 in Powershell for some reason. Since the packages were installed by the 3.9 pip, they weren't shown in Powershell. It works like it's supposed to when I force the right version by calling py.
PS C:\Python39\Scripts> py -3.9 -m pip -V pip 20.2.3 from C:\Python39\lib\site-packages\pip (python 3.9)
PS C:\Python39\Scripts> py -3.8 -m pip -V pip 20.2.4 from C:\Python38\lib\site-packages\pip (python 3.8)
PS C:\Python39\Scripts> py -3.9 -m pip freeze