Python easy.install with Chocolatey

In my company I’ve basically completely moved to the Windows platform. My company is the typical Microsoft shop and since I’m doing more management stuff with slides and “official” documents Linux wasn’t simply an option any more. My company deploys a method to completely remotely install a PC/Laptop with all the required standard set of software. However there are those very nice to have programs like Notepad++, CCleaner or ConEmu, which make life under Windows bearable or if you want to add a programming language like Python or Ruby.

Anyway, for some time I’ve been using Ninite to install and keep my selection of add-ons up to date. Until I learned about Chocolatey from Scott Hanselmans Dev Tool List. As he says: once you start using it, you’ll be hooked. Here are some additional notes from him.

Worked without any major problems for me until I wanted to install Pip after already having install the Python programming language itself. Pip has a dependency on Easy.install, which is installed in the process. However the installation of Easy.install fails for me with this error message:

> cinst easy.install
Chocolatey (v0.9.8.27) is installing 'easy.install' and dependencies. By installing you accept the license for 'easy.install' and each dependency you are installing.

easy.install v0.6.11.4
Setting PYTHONHOME environment variable to 'C:\tools\python2'
PS: PYTHONHOME variable is not required to Python works, but it is a good practice to have it.
Using python home at 'C:\tools\python2'
Installing easy_install for Python(2.7.8)...
Installing setuptools from http://pypi.python.org/pypi/setuptools ...
Using this proxyserver: 172.25.xx.yyy:zz
Downloading easy.install/setuptools 32 bit
  from 'http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11.win32-py2.7.exe'
Using this proxyserver: 172.25.xx.yyy:zz
Write-Error : easy.install/setuptools did not finish successfully. Boo to the chocolatey gods!
-----------------------
[ERROR] Exception calling ".ctor" with "2" argument(s): "Could not find a part of the path 'C:\TEMP\chocolatey\easy.ins tall\setuptools\easy.install\setuptoolsInstall.exe'."
-----------------------
At C:\ProgramData\chocolatey\chocolateyinstall\helpers\functions\Write-ChocolateyFailure.ps1:30 char:3
+   Write-Error $errorMessage
+   ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-Error

Write-Error : easy.install did not finish successfully. Boo to the chocolatey gods!
-----------------------
[ERROR] Exception calling ".ctor" with "2" argument(s): "Could not find a part of the path 'C:\TEMP\chocolatey\easy.ins tall\setuptools\easy.install\setuptoolsInstall.exe'."
-----------------------
At C:\ProgramData\chocolatey\chocolateyinstall\helpers\functions\Write-ChocolateyFailure.ps1:30 char:3
+   Write-Error $errorMessage
+   ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-Error

Write-Error : Package 'easy.install v0.6.11.4' did not install successfully: Exception calling ".ctor" with "2" argumen t(s): "Could not find a part of the path 'C:\TEMP\chocolatey\easy.install\setuptools\easy.install\setuptoolsInstall.exe '."
At C:\ProgramData\chocolatey\chocolateyinstall\functions\Chocolatey-NuGet.ps1:90 char:17
+                 Write-Error "Package `'$installedPackageName v$installedPackageV ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-Error

Finished installing 'easy.install' and dependencies - if errors not shown in console, none detected. Check log for error

Apparently there is something wrong with the path setup for download and installing the setuptoolsInstall.exe executable.

I circumvented the problem by executing the following steps. I installed wget via Chocolatey, simply for the fact, that I’m familiar with it. You’ll be able to achieve the same results by using other Windows native tools, you are familiar with.

 > cinst wget

Then I changed to the temporary installation location used by Chocolatey for easy.install and created another easy.install directory and changed into it.

> cd c:\temp\chocolatey\easy.install\setuptools
> mkdir easy.install
> cd easy.install

Your working directory should now be

C:\temp\chocolatey\easy.install\setuptools\easy.install

Notice the 2 easy.install directory components. Now download the setuptools package via wget into this directory under the name setuptoolsInstall.exe. Depending on your location within the larger network, you might additional need to configure the proxy server either in the environment or via additional command line options.

> wget --no-check-certificate -O setuptoolsInstall.exe http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11.win32-py2.7.exe
> dir

Directory: C:\temp\chocolatey\easy.install\setuptools\easy.install

Mode  LastWriteTime    Length Name
----  -------------    ------ ----
-a--- 27.08.2014 09:16 227956 setuptoolsInstall.exe

After these steps the installation of easy.install via Chocolatey should succeed normally.

> cinst easy.install

I did all the above steps within a PowerShell window. With cmd.exe you mileage may vary.

Emptying the Basement: My Computer History

I’ve started the process of emptying my basement. There is still stuff there, that I’ve build during my apprenticeship years with the company then called “Nixdorf Computers”, basically my computer roots from more than 30 years ago. To remember everything I photographed every note worthy item. Then I I will junk everything. My computer history started with a NASCOM 1 single board computer using the Z80 microprocessor. According to Internet wisdom, this board was designed in 1977 and then sold from 1978 onwards. The size was about a single A4 paper. I bought my system used from a friend of a friend in early 1981. There is a TheRegister article from 2013 “UK micro pioneer Chris Shelton: The mind behind the Nascom 1” about the creator of the NASCOM. On the second page of the article there is a schematic how the individual components were connected, just as I remember it. Here are two more links of pictures of the NASCOM 1 (1 & 2). There is even a blog about “Working NASCOM Microcomputers in the UK”. I distinctly remember the static RAM chips 2102 with an organisation of 1024 x 1bit. Of these 1k roughly a little more than 800 bytes were left for user programs, which needed to be saved/restored to and from a cassette tape. A 2708 EPROM (1k x 8) contained the NASBUG monitor program. One of my first enhancements was the extensions of the RAM size by doubling it using the 2114 static RAM chips. These chips had a 1024 x 4bit organisation. The original NASCOM board is long gone, however this next enhancement still exists.

Z80 Buffercard
Z80 Buffercard

Z80 Buffercard (Backside)
Z80 Buffercard (Backside)

This contraption replaced the Z80 CPU on the main board and the Z80 CPU moved the 40 pin socket on this extension. The 74LS244 TTL chips are one directional bus driver chips mostly located in the address and other signal lines of the CPU. The 74LS245 TTL chip is a bi-directional bus driver, sitting in the data lines of the CPU. With this extension the CPU lines are low impedance enough that is allowed me to connect the following bus card to the NASCOM motherboard.

Bus backplane
Bus backplane With this bus card

I gradually moved the NASCOM to a number of boards consisting of cards in 100 x 160mm in size. I used a design from the electronics magazine Elektor, which I etched myself.