Search code examples
pythonpython-modulepytube

Python script stops working when run outside of pycharm


I wrote my first program with a non built-in module and it works when I run it in pycharm, but when I try to run it in cmd I get an error: app.py, line 1, in <module> from pytube import YouTube ModuleNotFoundError: No module named 'pytube' I've tried installing pytube module via cmd once again, but the problem still occurs

EDIT: The rest of my scripts are working fine (there are using built-in only modules)


Solution

  • Ok, so after some research and trying different solutions, I managed to run my script just by copying the missing module to the same directory as my app.py file, I don't know if it's the best solution, but it works.