Running Python Application On Another Machine
已回答
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.
请先登录再写评论。
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.