"Compiling" Python to run on another machine
<p>I have created a simple-medium complexity script written in Python using Pycharm on my laptop and I wish to run this on my Raspberry Pi using Crontab. All of my past programming experience has been with C++ and C# in Windows and so I would normally just do a build of the project and it all gets compiled and linked into a single executable file.</p>

<p>For Python how do you "compile" the script so that it can be run on another PC? I use some external libraries (requests and ImgurClient) which I had to install using the Pycharm app. I guess I'm correct in thinking that these need to be taken across to the RaspPi too? My script is in two files and so do I need to copy both of these files across? Is there a way to build them into a single file to use easily?</p>

<p>This is my first script which I've written just from my knowledge of other languages and a bit of Googling. Just don't know how to proceed now that I have the actual script.</p>

<p>If you have Python installed on your Raspberry Pi, then from the shell, you just need to run:</p>

<pre><code># This installs pip (Python installer) as well as the requests library
sudo apt-get install python-pip
</code></pre>

<p>Once that is installed, run:</p>

<pre><code># To install the ImgurClient
pip install imgurpython
</code></pre>

<p>Then you can just run your script at the shell by typing:</p>

<pre><code>python your_script_name.py
</code></pre>

<hr>

<p>If you do not already have Python installed, just run the following command to install it before the others:</p>

<pre><code>sudo apt-get install python
</code></pre>

python cron pycharm