Changes

Jump to: navigation, search

OPS435 Python Lab 1

120 bytes removed, 13:13, 1 August 2017
PART 1 - Installing Your Linux Distribution
:'''Perform the following steps:'''
:#The first step is to update your entire system. <source lang="bash">
yum update
</source>
:#Install extra packages for enterprise linux:<source lang="bash">
yum install epel-release
</source>
:#Next install applications that we required, first Python version 3 and version 2:<source lang="bash">
yum install python34 python34-devel # Install python3.4 and python3.4 development libraries
yum install python python2-devel # Install python2.7 and python2.7 development libraries
</source>
:#Next, you will install a couple of useful applications called '''tmux''' and '''screen'''. They are referred to as '''terminal multiplexers'''. If you plan to spend a lot of time in the terminal, this powerful tool will help you get it done. Lets install it and plan to use it later:<source lang="bash">
yum install screen tmux && ln -s /usr/bin/true /etc/sysconfig/bash-prompt-screen
</source>
:# Set your hostname to the Linux Distribution we are using in case you did not set it correctly during the install process:<source lang="bash">
hostnamectl set-hostname centos7 # Set your hostname to distribution-name
</source>
'''Sublime'''<br>Another powerful and popular text editor designed for programming. Is not free or open source.}}</blockquote>
<ol><li value=6" style="margin-left:25px;">'''Python pip''' is a package manager specifically for Python. While it is usually not recommended to install software outside of '''dnf''' or '''yum''', sometimes the only way to get a specific or latest version will be through pip:<source lang="bash">
yum install python-pip # Install python2.7 pip
yum install python34-pip # Install python3.4 pip
</source></li>
<li style="margin-left:25px;">Issue the following command to install '''git''':<source lang="bash">
yum install git # Install git command line tool
</source></li></ol>
<blockquote style="margin-left:35px;">{{Admon/tip|What is a Git?| '''Git''' refers to a '''version control system''' that allows you to track any changes made to files and programs. Our primary use for git in this course will be for backup onto to the internet. Check out '''bitbucket''' for a free private code repository.}}</blockquote>
<ol><li value="8" style="margin-left:25px;">IPython will be one of the tools we will use the most. Lets install it. You will learn more about it in the next section:<source lang="bash">
yum install python-ipython # Install ipython for python2.7
pip3.4 install ipython # Install ipython for python3.4
</source></li>
<li style="margin-left:25px;">Issue the following commands in your shell to check your work for this section:<source lang="bash">
cd ~/ops435/lab1/
pwd #confirm that you are in the right directory
<li style="margin-left:25px;">
Perform the following steps to evaluate this unit. Run these check scripts regularly as you work through the labs, they may give you hints if you get stuck.</li>
:<source lang="bash">
cd ~/ops435/lab1/
pwd #confirm that you are in the right directory

Navigation menu