Setting up Python and Wing 101 at Local
Instructions for Linux Users
If you are using a Windows operating systerm, click: here.
If you are using a Mac operating systerm, click: here.
0 |
Open up a terminal window and type the following command to check if you have Python 3.X.X installed. If you have Python 3.X.X installed, it will show you the location of the Python executable.
which python3
If it shows the path of Python. Then check the version of Python 3.X.X installed by typing the following command:
python3 --version
If the version is between 3.7.2 and 3.12.9. You can skip ahead to step 4 to download wing 101. If it is higher than 3.12.9, you can also skip ahead to step 4 to download wing 101 with one more step check the compatibility of wing 101.
|
1 |
Go to the Python Download page, which is located at
Python 3.12.9 Download Page.You should see
the following on the bottom of the page.
Click on the links XZ compressed source tarball. It should immediately
start a download of Python source file.
|
2 |
Double click the file you have downloaded to install Python 3.12.9 compressed file. It should extract a folder named
Python-3.12.9.:
|
3 |
You will now be guided through the Python 3.12.9 installtion process.
First we need install the dependencies. Open up a terminal window and type the following command to install the dependencies:
sudo apt update
sudo apt install -y \
build-essential \
libssl-dev \
zlib1g-dev \
libncurses5-dev \
libncursesw5-dev \
libreadline-dev \
libsqlite3-dev \
libgdbm-dev \
libdb5.3-dev \
libbz2-dev \
libexpat1-dev \
liblzma-dev \
tk-dev \
libffi-dev \
wget
Then, go to the folder where you have extracted the Python 3.12.9 source file. You can do this by typing the following command in the terminal:
cd ~/Downloads/Python-3.12.9
Then, type the following commands to make the Python 3.12.9 source file:
sudo ./configure --enable-optimizations \
sudo make -j$(nproc)
After make process the python file should be produced in current drictory. Now we link this file to our path by following steps:
mkdir -p ~/.local/bin \
ln -sf ~/Downloads/Python-3.12.9/python ~/.local/bin/python3.12.9 \
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc \
source ~/.bashrc
The output should be like following:
|
4 |
You will now be guided through the Wing 101 installtion process. Wing 101 is an Integrated Development
Environment (IDE) like Dr. Racket. It allows you to write and run code in one program.
Go to the Wing IDE download page, which is located at
Wing 101 Download. Make sure that the top of the page says Wing 101 as this is the free version of Wing.
|
5 |
On the right-hand side of the page, there will be green buttons. Press on
the platform that you used to download the installer.
>
|
6 |
Once the installer is downloaded, double-click on it to open it. Then click Install. This step may require you to enter your password.
|
7 |
Once the installation is finished, you might need to lookup Wing 101 in your
applications to be able to open it.
Open up Wing 101, the "License Agreement" window will show up (first time only).
Press Accept to enable access to the IDE.
You may also choose Keep in Dock for future convenience.
|
8 |
You will now be guided through the process of configuring Python 3.12.9 on Wing 101.
It is possible that Python has already been linked to Wing 101. To check, see what
is the message on the bottom right-hand box. If it has a message like the one below,
Python is already configured. You can skip ahead to step 11 to test your configuration.
Note: Python version could be different.
|
9 |
If you have a different message, Python executable path is not configured properly. To
configure Python Python executable, go to Edit -> Configure Python.
It will open up a window like this:
|
10 |
Select the Command Line shown below. And paste the executable path from either step 1 which python3 or step 3 which python3.12.9 .
Then click Apply.
The following warning will show up, then click Restart.
|
11 |
To double-check your Python set-up, open a new file and type
print("Hello World") in the top window. Then, save your file somewhere on your computer! Then press on the green arrow button
in the tool bar at the top to run the program. If you don't save your file, the green arrow button will be gray and you will not be able to press it!!!
Hello World should show up in the Python Shell at the bottom.
|
If you have any questions or if your installation doesn't work correctly, please
go to ISA office hours or email us at cs231@uwaterloo.ca.
|