Pycharm Project does not start from command line

pycharm automatically does a lot of stuff for my code to work, e.g. setting the path variable.

Inside pycharm, everything works fine.
When I want to start the script on a server, I get this error:

Traceback (most recent call last):
File "some.py", line 4, in <module>
import some.folder.ANOTHER_FILE
ModuleNotFoundError: No module named ASDF

 

How can I be sure that a pycharm-project starts when it is not executed within pycharm?
Is there an easy way to export a file that can just be executed?

Please sign in to leave a comment.