Advertisement

Saturday, February 23, 2019

Setting up Development Environment

I want to setup a development environment that I can use from anywhere.  The goal is to be able to do coding on my laptop, one of my Raspberry Pis or, possibly, a Chromebook.  I would like to use Eclipse as the IDE and Github as the code repository.

Laptop Setup
First, I am going to get the laptop working.  

I have Eclipse installed on my laptop with the PHP add-in. In order to use Eclipse with Python, I need to install PyDev. The PyDev site has instructions to install and configure PyDev in Eclipse.

I have Java 8 on my laptop and Eclipse 2018-12 (4.10.0). I do not have Python installed.

Step one was to download the Python 2.7.16 64-bit installer for Windows 10 and install it on my laptop. I was able to execute Python from the command prompt so I know it is installed.

Next, I followed the instructions on the PyDev site to install PyDev from within Eclipse.  All you need to do is click Help / Install New Software and put in the URL for PyDev: http://www.pydev.org/updates

After installing, I had to configure the Python Interpreter in Eclipse. I had to tell Eclipse where the python.exe file was on my PC.

Git
A few days ago, I used BitBucket on the web to create a GitHub repository for the HESA.  I also installed Git for Windows on my laptop.  I then cloned the GitHub repository to my PC.  You must do this before you can do anything with Git on the PC.

Today, I copied all of the HESA code on my laptop to the folder created by Git when I cloned the repository.  Then, I used command line commands to upload my HESA py files to GitHub. 

git add --all

Then, I had to add my BitBucket email address by doing 

git config --global user.email prodigal67@bitbucket.org

Next, had to do 

git commit -m 'Mit comments'

This does a local commit.   Finally, I did 

git push

 to upload the files to the git repository. Now, I can see the files in the repository.

I repeated this process to get my Python module code in another repository in GitHub.

Raspberry Pi
Next, I moved on to my new Raspberry Pi 3+. It already has git installed and Python 3 and Eclipse.

I used the command line options to clone the github repositories to the pi.

Since Eclipse does not have the pydev extensions, I followed the same process to install them inside Eclipse.

That was all there is to it.  Now, I can make code changes on my Pi or my PC and synchronize those changes through GitHub. 

1 comment: