Running Lent 1A Python code on CUED machines for the first time
If you need to run your Python Lent programs and your laptop suddenly breaks, you can try this in the DPO to run your programs.
- Turn a computer off and on. When given a choice between Linux and Windows, use the cursor keys to select Linux (Rocky 9). Press the Return/Enter key.
- Log in. From the Applications menu, choose Terminal to make a text window appear.
- Start Firefox from the Activities menu. Use it to log into GitHub and go to your Repository
- Download your code as a zip file (there's an option in the "Code" menu). The file will be named after your repository. Here I'll assume it's called FOO. If you have spaces in the name you'll need to put quotes around the name in subsequent commands. The file will appear in your "Downloads" folder. You can type
ls Downloads
to see what files are in your "Downloads" folder. - Back in your text window do
unzip Downloads/FOO.zip
replacing "FOO.zip" by the name of your file. This will create a folder named after your repository. Docd FOO
replacing "FOO" by the name of your folder. If you now dols
you should see your files. - To install extra packages, type
python -m venv ~/venv source ~/venv/bin/activate pip install requests
etc - Type
python Task1A.py
to run Task1A.py, etc. If you need to do some emergency editing, start a simple editor by typinggedit &