I finished the course on Treehouse about using timezones in Python. Don't get me wrong, it is a good course. I can't say I like using workspaces (Treehouse's IDE) but I can see certain benefits of using it when starting out. So far I have been using PyCharm while following along with Treehouse and for my current Python coding projects (Hockey Shootout). I have no problem with JetBrains, although I hear Sublime is very good.
That sounds like it should be a discussion about bands...
Anyway, everything was progressing fine until the course said to use the pytz package which was already installed on workspaces. The video started by saying how to install it if not using Workspaces. Problem is the instruction was showing on the screen a single command to type to install it on your local machine. Understandably I went to the Terminal (I use a 2014 MacBook Air with El Capitan) and typed the command. Obviously that didn't work. I Googled "pytz install" and ended up downloading a .egg file from Python's website that was mentioned on another website (likely StackOverflow).
Countless Google searches later about errors I was getting I found myself stymied by this pip install that was so simply referenced in this Treehouse video. Some searching on my machine led me to find why I think this is so difficult. I used to use a Windows machine I bought so I could mess around and try programming. Once I tried some SQL and discovered the queries ran twice as fast on the Mac I quickly transferred and forgot about my Windows laptop (save for loading the original Starcraft and playing that for a bit). I remember programming on my Windows machine last year using a book on Python. The book used a graphics library in its lessons to demonstrate some principles. That was very simple. Download the file and save it in the folder with the other preinstalled Python libraries. From there it can be imported in the code. That is not the case with my Mac. At least not within my current computer understanding.
Python 2.x is preinstalled on my Mac. Some time ago I downloaded Python 3.x and that's what I use with PyCharm. Because I read not to uninstall Python 2.x from my computer I aliased Python 3.x in the Terminal and access it using 'python3'. Everything had been going swimmingly, that is until I tried installing this elusive pytz package. I never heard of a .egg file but I think it's what I need. I tried so many commands in the Terminal to install this package, all to no avail. Things I read on StackOverflow do not seem to work as their suggestions usually do. Commands such as 'python3 -m pip install dir/file'(and so many more) always come back with errors. Apparently I also have an outdated pip. I still have no solution.
I am ok with not understanding this. I don't fully comprehend timezones, and not just when it involves programming but that's a different story. I completed the course and am moving on to the next (regular expressions...). When I need dates and times in programming I will try harder to get it and I think I will be able to use them. I know when I start using Python databases it will surely be necessary to know how to use datetimes.
Thus this post is mostly how I've accepted that there are some things I won't understand. It is my impression that it is ok not to understand something. It reinforces the fact that there are many things I don't know and no-one has a monopoly on knowledge. I will draw on my lack of knowledge to bolster my motivation to continue learning.
25 words or less: When something causes too much frustration learn something else and return later to reexamine the problem with fresh eyes and a fresh mind.
No comments:
Post a Comment