Changes

Jump to: navigation, search

OPS435 Python Lab 1

136 bytes added, 15:39, 12 May 2017
no edit summary
'''Perform the following steps:'''
#After choosing your Linux distribution To keep everything simple we are going to use Centos7 for these labseach lab, install the latest graphical version of that Linux OS.<br><br>This course is designed with a unit testing suite, which can be used to look at the scripts you write and give real-time feedback.<br>This feedback is not perfect, however it may offer some hints if you get stuck with a error. It can also be used to make sure you are on the right track, and show progress.<br><br>
#Download the check script. Enter the following commands from the bash shell.<br><source>
cd ~/ops435/lab1/
'''Perform the following steps:'''
#The first step is to update your entire system. Fedora uses a new package manager: it is based on <source>yum, yet it contains newer code and has more maintainer features as also contains improved features. It should work very similarly to the yum command, but check the man pages if you get confused:update</source>#Install extra packages for enterprise linux<source>dnf updateyum install epel-release </source>#Lets start installing Next install applications we need, first Python version 3 and version 2:<source>dnf yum install python34 python34-devel # Install python3 .4 and python3.4 development librariesyum install python python2 -devel # Install python3python2.5 7 and python2.7development 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>dnf yum install screen tmux && ln -s /usr/bin/true /etc/sysconfig/bash-prompt-screen
</source>
# You will now set your hostname to the Linux Distribution we are using:<source>
hostnamectl set-hostname fedora24 centos7 # Set your hostname to distribution-name
</source>
#Installing vim(Vi IMproved) will give us syntax highlighting and allow for advanced customization for terminal editing:<source>
dnf yum install vim-common vim-enhanced # Install vim
</source>
#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>
dnf yum install python-pip # Install python2.7 pipcurl -O https://bootstrap.pypa.io/get-pip.py # Download python3.4 pip installersudo /usr/bin/python3.4 get-pip .py # Install python3.4 pip</source><br>In the dictionary, "git" is defined as an unpleasant or contemptible person. In the IT inductory, industry on the other hand, '''Git''' refers to a version control system that allows you to track any changes made to files and programs. The benefit to using git is primarily found when it's used with multiple people, sharing and working on code together. While that is not how we will be using it in this course, you may find some benefits in using it for managing multiple versions of the same program or for backing up your code onto the internet. Check out bitbucket for a free private code repository.<br><br>
#Issue the following command to install git:<source>
dnf yum install git # Install git command line tool
</source>
#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>dnf yum install python-ipython python3-# Install ipython for python2.7pip3.4 install ipython # Install enhanced interactive pythonipython for python3.4
</source>
#Issue the following commands in your Ipython shell to check your work for this section:<source>
198
edits

Navigation menu