Launch a terminal and run the following commands:
Change to your home folder.
$ cd $HOME
Install
python3-pip
andpython3-tk
.$ sudo apt-get install python3-pip python3-tk
Install
numpy
andpygame
.$ pip3 install numpy pygame
Create
lib
andworkspace
folders.$ mkdir lib workspace
Download
stdlib-python.zip
.$ wget https://www.cs.umb.edu/~siyer/teaching/stdlib-python.zip
Unzip
stdlib-python.zip
under ~/lib.$ unzip stdlib-python.zip -d lib
Remove
stdlib-python.zip
.$ rm stdlib-python.zip
Set the environment variable
PYTHONPATH
.$ echo "export PYTHONPATH=.:$HOME/lib/stdlib-python" >> $HOME/.bashrc
Download and install PyCharm (Community Edition).
To test your environment, download and unzip
ipp.zip
under~/workspace
, launch PyCharm, open the project~/workspace/ipp
, and run the following commands in the PyCharm terminal:$ python3 helloworld.py
$ python3 bouncingball.py
$ python3 playthattune.py < data/looney.txt
To add a Python interpreter to a project in PyCharm, open the project, go to
File > Settings > Project: <project name> > Python Interpreter
, and from the pull-down menu on the right select Python 3.x that is installed in the system.
Launch a terminal and run the following commands:
Change to your home folder.
$ cd $HOME
Install
brew
.$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install
python-tk
andwget
.$ brew install python-tk wget
Install
numpy
andpygame
.$ pip3 install numpy pygame
Create
lib
andworkspace
folders.$ mkdir lib workspace
Download
stdlib-python.zip
.$ wget https://www.cs.umb.edu/~siyer/teaching/stdlib-python.zip
Unzip
stdlib-python.zip
under ~/lib.$ unzip stdlib-python.zip -d lib
Remove
stdlib-python.zip
.$ rm stdlib-python.zip
Set the environment variable
PYTHONPATH
.$ echo "export PYTHONPATH=.:$HOME/lib/stdlib-python" >> $HOME/.zshenv
Download and install PyCharm (Community Edition).
To test your environment, download and unzip
ipp.zip
under~/workspace
, launch PyCharm, open the project~/workspace/ipp
, and run the following commands in the PyCharm terminal:$ python3 helloworld.py
$ python3 bouncingball.py
$ python3 playthattune.py < data/looney.txt
To add a Python interpreter to a project in PyCharm, open the project, go to
File > Settings > Project: <project name> > Python Interpreter
, and from the pull-down menu on the right select Python 3.x that is installed in the system.
Install Python 3, making sure you have checked the box that says Add Python 3.x to PATH.
Launch a powershell terminal and run the following commands:
Change to your home folder.
$ cd $HOME
Install
numpy
andpygame
.$ pip3 install numpy pygame
Create
lib
andworkspace
folders.$ mkdir lib,workspace
Download
stdlib-python.zip
.$ wget -O stdlib-python.zip https://www.cs.umb.edu/~siyer/teaching/stdlib-python.zip
Unzip
stdlib-python.zip
under~/lib
.$ Expand-Archive -LiteralPath stdlib-python.zip -DestinationPath lib
Remove
stdlib-python.zip
.$ rm stdlib-python.zip
Set the environment variable
PYTHONPATH
.$ setx PYTHONPATH ".;$HOME\lib\stdlib-python"
Download and install PyCharm (Community Edition).
To test your environment, download and unzip
ipp.zip
under~/workspace
, launch PyCharm, open the project~/workspace/ipp
, and run the following commands in the PyCharm terminal:$ python.exe helloworld.py
$ python.exe bouncingball.py
$ Get-Content data/looney.txt | python.exe playthattune.py
To add a Python interpreter to a project in PyCharm, open the project, go to
File > Settings > Project: <project name> > Python Interpreter
, and from the pull-down menu on the right select Python 3.x that is installed in the system.