Thursday, March 24, 2016

Installing Python, pip

Dev,

I've installed Python 2.7.11 and 3.5.1 onto my Windows machine. I've set both in my PATH. Interestingly, version 2.7.11 is installed on the main C:\ drive and version 3.5.1 is installed in my C:\Program Files. At first, version 3.5.1 sets its location to my User folder, but I wanted All Users to have access to this Python.

Anyhow, once set, I run in the Command Line and seems the latest version runs (i.e. 3.5.1).

Below are some basic commands.

Download Links

https://www.python.org/downloads/release/python-2711/
https://www.python.org/downloads/release/python-351/

Basic Commands

Is Python installed, Find Version

$ python --version

Is PIP installed

$ pip list

References

https://www.python.org/
https://en.wikipedia.org/wiki/Pip_(package_manager)
http://stackoverflow.com/questions/4750806/how-do-i-install-pip-on-windows

http://stackoverflow.com/questions/11425106/python-pip-install-fails-invalid-command-egg-info
http://stackoverflow.com/questions/4750806/how-do-i-install-pip-on-windows
http://stackoverflow.com/questions/15031694/installing-python-packages-from-local-file-system-folder-with-pip

https://pypi.python.org/pypi/slack-cli/0.1.0

Tuesday, March 8, 2016

PHPUnit - Solving my Installation Issues

Hey Devs,

Problem

I ran into a few things while trying to install PHPUnit.

I read this article and then I also did some research on YouTube and SO, but didn't find anyone who resolved my issue.
https://phpunit.de/manual/current/en/installation.html

I am running PHP via my Bitnami application.

Solution

Here's how I resolved my issue.

First, I needed to add the PHP executable into my Windows PATH.
To be clear, I added a new PATH variable pointing to my PHP.exe file and then added this variable into my PATH:

PHP_HOME: C:\Bitnami\wampstack-5.5.29-1\php
Path: ...;%PHP_HOME%



Next, I added the PHPUnit executable into my Windows PATH. However, I did create the command script as instructed in the PHPUnit webpage (mentioned above). Notice, I created the "bin" folder as "phpunit" and placed within my Bitnami application folder.

PHPUNIT_HOME: C:\Bitnami\wampstack-5.5.29-1\phpunit\bin
Path: ...;%PHP_HOME%;%PHPUNIT_HOME%


Then, I was able to continue with the instructions per the PHPUnit Installation webpage. I ran into this error, but that's ok since I only need to update the latest PHAR file from PHPUnit.
*Note: Be sure to open a new CLI each time you update the PATH.


I'm not going to update my PHP version because I'm not sure what the effects will be on my application which I'm going to use unit tests for. I'd rather get a working PHAR first and then I'll update my PHP version and begin fixing any upgrade issues. So, I'm using PHPUnit 4.8.23 instead of current stable release version of 5.2.10.


Excellent, this message reflects the one on the PHPUnit webpage! Now I can move forward with the tutorials and creating unit tests - hip hop hoorayyyy!

Quick Online Reference

https://phpunit.de/manual/current/en/phpunit-book.pdf