Hello all, it has been a little while. My time has been taken up by communicating with my team. This term we have a team member that is not from the Ecampus, and so I’ve been trying to communicate as much as possible. That continued as I hit road blocks.
When we started meeting with our project partner the main focus was on setting up our environments because we were accessing an existing code base. We’ve all signed NDAs so I can’t go into details, but suffice it to say I did not think it would be a 4 week project simply to get the code working…
We started by trying to setup the initial requirements and setup using Window[probably all 10]. However, the first member to get a “working directory” used a fedora linux VM(virtual machine). I wanted to continue using Windows as I could help other team members if I figured out my own setup. This started me down a long and narrow path, one full of past setup mistakes/strange bugs.
Python has different versions it turns out. Yeah, the first problem I ran into was that I was using the wrong version. What version was that? Well, I had 2 versions installed, and I used to have 3. Then I decided that I might as well just install the one our project partner was using…So I ended up having 3 again. All of them were python 3+. For those who don’t know, you can switch between python 2 and python 3 pretty easily. But switching between different versions of python 3+ is a different story. I ended up uninstalling every version, then installing one that our project partner said should work. However, a ghost of python 3.11 still haunted me.
I setup dummy code which worked the same as the initial setup bash file I was given. This told me that I had no modules installed even though I just ran pip. Nothing installed, and yet commands showed that they existed. What is more, I could run the same code inside command line and it worked, I just couldn’t get it working from a bash file. What was going on? Turns out, python 3.11 was still installed on Ubuntu; my VM that I use for WSL(windows VM for Linux). After uninstalling it from Ubuntu I could no longer run any python code through bash files. I ended up with a very simple fix that took far to long to figure out. I started using git bash instead of the basic command line that windows comes with. I know I should always use something like powershell, the Ubuntu VM would’ve probably worked better too.
That was the main problem, the haunting! But I still had a few hurdles before the code was up and running. I needed headers, and from libraries. I had tried to install them through command line, and the setup requirements includes these required libraries. Although, I don’t think they include the headers, and those are necessary. I might’ve been the first team member to figure out how to install the headers. I installed source files. But one of them ended up being too new for the code to run. The other was unable to add to the Path environment variable because it was “too long” already. So, to fix the first problem I tracked down the archived versions and snagged one. To fix the next, I had to add the bin folder manually to the Path. To fix both–and yes they both had an additional problem–I added a environment variable which was named [Name of library]_Dir, this solution was spit out in the terminal when I ran the setup bash.
That was it, a GitHub pull to a working setup environment. I now see why people use VMs for projects; the software versions, not to mention the dependencies are isolated. I hope you all have good luck on your next pull request, perhaps you’ll run into one of these issues and think, “well, it had to happen as least once,” that’s how I thought of it. After all, a learning experience is always welcome.