This lab is for those who are installing PyCharm on Mac machines.
.exe
file and double-click to run.We are going to create a sample project directory using PowerShell, then open PyCharm and edit files in that directory. A video follows the steps.
cd ~ # make sure in your home directory
mkdir seng-201 # This directory will hold all our code for the course
cd seng-201 # change to the new directory
mkdir pycharm-test # Make a new subdirectory for a test project.
cd pycharm-test # change into the subdirectory
pycharm64 . # launch PyCharm in the current directory
pycharm64
command launches the PyCharm program. The command pycharm64 .
says launch Pycharm and have it open the current working directory. The symbol .
always means the working directory. Sometimes it will be necessary to explicitly tell the CLI we are referring to the working directory; more on those situations as they arise.main.py
file.Let’s create a file in the PowerShell in our project directory. We should see it immediately in PyCharm.
pycharm-test
directory.echo "print('Hello World')" > hello.py
to create a Python file.hello.py
in the directory here. Click on it and it will open an empty editor pane.print("How are you?")
.cat hello.py
. You should see the code.So you now have PyCharm successfully editing files and interacting with directories on Mac.
You are now ready to code! Move on to PyCharm Basics lab.