I'm using Python 3.6 in Windows and using PyCharm. I have a .py file that is using packages installed on a venv which is in a different folder to the .py file.
I'm trying to run this .py from command line and when I do it gives me a ModuleNotFoundError: No module named '<module>'
. The file works fine from PyCharm just not from the command line because the packages are in the venv.
How can I get the file to run without errors from command line and keep the packages in the venv?
Many thanks.