Running Python Application On Another Machine

Answered

Wrote a semi-complex application with the PyCharm product using a virtual environment but now I need to distribute the code to my work machine.  I'm not sure how to put the package together that will allow the code to run without the Pycharm IDE.  Running the code from the command line (Using Linux Mint) errors that complain none of my imports are available.  Thank you.

0
1 comment

Hi Elcidsps,

The interpreter on the machine where you are running your code should have all the required (used in your code) modules in order to correctly run it. 

You can use pip freeze > requirements.txt (on the interpreter which is used in PyCharm during development) and then pip install -r requirements.txt (on the interpreter of another machine) in order to get the same set of modules. See https://pip.pypa.io/en/stable/reference/pip_freeze/ for more info.

0

Please sign in to leave a comment.