Resources

Let's set up your Python environment with only 2 steps | PydyTuesday Python Projects

In this video, let's get your project set up. Learn how to install Positron, create a new Python project, and set up a virtual environment. We hope you join us in participating in PydyTuesday! Don't forget to use the hashtags #TidyTuesday and #PydyTuesday wherever you like to hangout online - Bluesky, Mastodon, LinkedIn, etc. - have fun out there! We can't wait to see the predictive models, visualizations, dashboards, and data apps that you create Resources and Repos to star: TidyTuesday GitHub Repo: https://github.com/rfordatascience/ti... Posit PydyTuesday GitHub Repo: https://github.com/posit-dev/python-t... TidyTuesday hashtag search on Bluesky: https://bsky.app/search?q=tidytuesday Other videos in this PydyTuesday playlist: • PydyTuesday | Python How-to Videos #pythoncontent

image: thumbnail.jpg

Transcript#

This transcript was generated automatically and may contain errors.

Are you ready to dive into your next Python project, but feeling a bit overwhelmed by where to begin? Or perhaps you're worried about your new code clashing with existing projects on your machine? In this video, we'll guide you through the essential steps to set up a robust and isolated Python development environment. We'll leverage Positron, Posit's powerful new IDE to get you started on the right coding path, ensuring your projects are organized, efficient, and headache free.

Installing Positron and creating a project

To install Positron, you'll want to visit the website here at the top of the screen. You'll also need to ensure Python is installed on your machine.

After opening Positron, we'll want to first create a new Python project. After selecting Next, we'll then change the name of our project to PydyTuesday. This will create a new folder called PydyTuesday in the parent directory located in the text box below. Finally, it's always a good idea to initialize your project as a Git repository so that we can leverage version control.

Setting up a virtual environment

Finally, it's time to tell Positron how to set up our Python environment. We'll create a brand new, isolated, virtual environment using venv. This is crucial because it keeps your project's dependencies entirely separate from other Python projects on your machine, preventing any conflicts or crosstalk. After that, we'll simply select our preferred Python interpreter and click Create. We are given the option to open the new project in the current Positron window or open a new window. Let's select New Window.

We'll create a brand new, isolated, virtual environment using venv. This is crucial because it keeps your project's dependencies entirely separate from other Python projects on your machine, preventing any conflicts or crosstalk.

And there it is! You successfully created a new Python project in Positron. Notice that there is a blank Python file, making it incredibly easy to jump right in and start coding.