Python installation: Difference between revisions

From ACL@NCU
Jump to navigation Jump to search
Line 31: Line 31:
=Install Python on Mac OSX=
=Install Python on Mac OSX=
==Files to download==
==Files to download==
*assuming that you download files to the "Downloads" directory under your home directory, which is the default.
#python 2.7.14 for mac (python-2.7.14-macosx10.6.pkg)
#python 2.7.14 for mac (python-2.7.14-macosx10.6.pkg)
#get-pip.py
#get-pip.py
#install_python
#install_python
#sq.py
#sq.py
==Steps to follow==
==Steps to follow==
*Double click on the downloaded python-2.7-14-macosx10.6.pkg program.
*Double click on the downloaded python-2.7-14-macosx10.6.pkg program.

Revision as of 08:29, 1 March 2018

Installing Python on your Windows laptop

Files to download (from the Google Classroom "course materials" area)

  1. create a folder c:\temp, save the following files to this folder
  2. Python 2.7.14 (win 32-bit)
  3. get-pip.py
  4. install_python.bat
  5. sq.py

Steps to follow

  • Double click on the downloaded python-2.7-14.msi program.
  • Open a command window and change directory to where you saved get-pip.py

<syntaxhighlight lang="DOS" style="border:3px dashed black"> cd c:\temp </syntaxhighlight>

  • execute get-pip.py

<syntaxhighlight lang="DOS" style="border:3px dashed black"> python get-pip.py </syntaxhighlight>

  • execute the install_python.bat script

<syntaxhighlight lang="DOS" style="border:3px dashed black"> install_python.bat </syntaxhighlight>

  • After the above process are completed (without error or interruption), try the following script:

<syntaxhighlight lang="DOS" style="border:3px dashed black"> python sq.py </syntaxhighlight>

  • If everything works out, you should see a window containing a light blue square at the center as shown below (lasting for 2 seconds then vanishes).


Install Python on Mac OSX

Files to download

  • assuming that you download files to the "Downloads" directory under your home directory, which is the default.
  1. python 2.7.14 for mac (python-2.7.14-macosx10.6.pkg)
  2. get-pip.py
  3. install_python
  4. sq.py

Steps to follow

  • Double click on the downloaded python-2.7-14-macosx10.6.pkg program.
  • Open a terminal window and change directory to where you saved get-pip.py

<syntaxhighlight lang="bash" style="border:3px dashed black"> cd /Users/<Your account>/Downloads </syntaxhighlight>

  • execute get-pip.py

<syntaxhighlight lang="bash" style="border:3px dashed black"> python get-pip.py </syntaxhighlight>

  • execute the install_python script

<syntaxhighlight lang="bash" style="border:3px dashed black"> bash install_python </syntaxhighlight>

  • After the above process are completed (without error or interruption), try the following script:

<syntaxhighlight lang="bash" style="border:3px dashed black"> python sq.py </syntaxhighlight>

  • If everything works out, you should see a window containing a light blue square at the center as shown below (lasting for 2 seconds then vanishes).