Running Python File from Command Line with Libraries in venv
You need to activate the virtual environment by callling the activation script:
<path to your environment>\Scripts\activate.bat
as indicated here. Then you will automatically use all the packages installed in this environment when calling your script. Your pycharm is probably set up to automatically use your virtual evnironment