Repository navigation
PythonStart
learnitlessons edited this page Jul 30, 2024
·
3 revisions
Welcome, Python developer! This guide will walk you through setting up a comprehensive Python development environment, including core tools, version control, and IDEs. Follow these units to create an optimal workspace for your Python projects.
- Visit the official Python Downloads page.
- Download the latest stable Python release (currently Python 3.12.2, but check for updates).
- Run the installer with admin rights, making sure to check "Add python.exe to PATH".
- Complete the installation with the recommended settings.
- Open a terminal (Command Prompt for Windows, Terminal for macOS/Linux).
- Run the following command to check the Python version:
python --version - Ensure the output matches the version you installed. If not, revisit Task 1.1.
- In the terminal, start the Python REPL by typing:
python - Try out some Python commands:
print("Hello, Python!") import sys; print(sys.version) exit() # to close the REPL
- Go to the official Git Downloads page.
- Download the appropriate version for your operating system.
- Run the installer, accepting the default options (you can customize if you're familiar with Git).
- During installation, ensure that "Git Bash Here" and "Git GUI Here" options are selected for easy access.
- Choose to use Git from the Windows Command Prompt (Windows-specific option).
- Open a new terminal window (to ensure PATH updates take effect).
- Run the following command to check the Git version:
git --version - If you see a version number, Git is successfully installed. If not, try restarting your computer or revisit Task 2.1.
- Go to the PyCharm download page.
- Choose and download the Community Edition for your OS.
- During installation, select "Create Desktop Shortcut" and "Update PATH variable".
- Visit the Visual Studio Code download page.
- Download and install VS Code, selecting "Add to PATH" during setup.
- After installation, open VS Code and install the Python extension from the marketplace.
- Open your terminal and navigate to your projects directory.
- Clone the course repository with this Git command:
git clone https://github.com/learnitlessons/pythonlearnit.git - Move into the cloned directory:
cd pythonlearnit - Check the contents with
dir(Windows) orls(macOS/Linux).
- From your project directory in the terminal:
- For PyCharm:
pycharm . - For VS Code:
code .
- For PyCharm:
- Set up your project interpreter and ensure Git is properly integrated.
If you need to start coding quickly or prefer cloud-based environments, consider these options:
- Jupyter Notebook: Great for data analysis and interactive Python development.
- Google Colab: Jupyter notebooks with free GPU access (requires Google account).
- GitHub Codespaces: Full VS Code experience in the cloud (requires GitHub account).
Congratulations! You've completed the setup of your Python development environment, including core tools, version control, and IDE configuration. You're now ready to start coding your Python projects. Happy coding!