diff --git a/getting-started.qmd b/getting-started.qmd index d0d4898..fae6df5 100644 --- a/getting-started.qmd +++ b/getting-started.qmd @@ -12,7 +12,7 @@ The world confronts us. Make decisions we must. We use [**R**](https://www.r-project.org/about.html) via [**Positron**](https://positron.posit.co). R is to Positron as a car's engine is to its dashboard. -More precisely, R is a programming languages that runs computations, while Positron is an *integrated development environment (IDE)* that provides an interface with many convenient features. Just as having access to a speedometer and navigation system makes driving much easier, using Positron's interface makes working with R and Pythom much easier. +More precisely, R is a programming languages that runs computations, while Positron is an *integrated development environment (IDE)* that provides an interface with many convenient features. Just as having access to a speedometer and navigation system makes driving much easier, using Positron's interface makes working with R and Python much easier. Download and install R and Positron on your computer. @@ -381,17 +381,60 @@ knitr::include_graphics("getting-started/images/ending.gif") You also have the option of [downloading and installing Python](https://www.python.org/downloads/). -There are many ways to install Python but we will install it through uv, an extremely fast Python package and project manager written in rust. +**What is Python?** +Python is a flexible and high level object oriented programming language. What does this mean? As a language, Python is closer to human language than machine code, making it a great starting point for beginners. In a lower level language you might have to say every little step like “Move your right hand 5 inches to the flour jar, open the lid, pick up exactly 250 grains of flour...”, while in a higher level language like Python you can just say "Add 2 cups of flour". In a programming perspective lower level languages would get very tedious and arcane for beginners: dealing with things like managing memory, manual data types, and complicated syntax. Thats why we are starting Python. Additionally Python supports modules and packages, like R, enabling users to utilize tools that have already been coded by other people. -Here are some simple and easy to follow steps but if you would like more info check out this video[https://www.youtube.com/watch?v=mru9z50IOhI] +**Installing Python** +There are many ways to install Python but we will install it through **uv**, an extremely fast Python package and project manager written in Rust. -1. https://docs.astral.sh/uv/getting-started/installation/ at this link, go to the installation section in the appendix, and execute the specified code based on the device you are using. in Positrons terminal. +This is the homepage of the documentation of [uv](https://docs.astral.sh/uv/). Access the link, and go to the installing Python section in the appendix. It looks like this +```{r} +#| echo: false +knitr::include_graphics("getting-started/images/uv-installation.png") +``` -2. Go to the installing Python section in the appendix and execute the code specified there in terminal as well. +There are different installation instructions for Mac/Linux and Windows, so choose the correct tab. + +**Mac/Linux** +There are 2 different installation prompts specified in the documentation, however if you are a Mac, just go with the first one. All Macs have curl pre-installed. In terminal run the first installation prompt. +For reference: +```{r} +#| echo: false +knitr::include_graphics("getting-started/images/curl-installation.png") +``` -3. Reload Positron back up and you will see Python as an option for an interpreter +Most Linux devices come installed with curl, but if you would like to check if curl is installed on your device, run `curl --version` in terminal. If no error pops up, it is installed on your device, and you can proceed with the step above. If your device does not have curl, check if it has wget using `wget --version` in terminal. Again, most Linux devices have wget but if the command give you an error, then you do not have wget or curl and will have to install one of the two. Please reference this short [article](https://help.ubidots.com/en/articles/2165289-learn-how-to-install-run-curl-on-windows-macosx-linux) to install curl. +**Windows** +The installation prompt for Windows uses powershell, but it works on Git Bash regardless, so do not worry. Run the prompt in terminal like so: +```{r} +#| echo: false +knitr::include_graphics("getting-started/images/windows-installation.jpg") +``` + This will temporarily revert the terminal to powershell to install uv, and then back to git bash once again. + + **uv Python** +After uv has been succesfully installed on your device, run `uv python install` in terminal. + +**Mac** +Python has been installed through uv, and all you need to do is go to the search bar, and search ">Python: Select Interpreter", and python 3.14 or whatever version of python you have installed will be an option, and you will be able to open a Python console. + +**Windows** +*Its a bit more complicated for Windows users compared to Mac +In the search bar type ">Python: Select Interpreter" and this is what you will see +```{r} +#| echo: false +knitr::include_graphics("getting-started/images/windows-interpreter.jpg") +``` +Click on the "Enter interpreter path" option and press "Find...". This will bring you to a version of your File Explorer. Almost always the path that your Python will be installed in is OS(C:) and Users/YOUR NAME/.local/bin. If you cannot find a version of Python in that location, like so: +```{r} +#| echo: false +knitr::include_graphics("getting-started/images/python-location.jpg") +``` +then ask ChatGPT for a solution. +So when it asks you to find, go to 'Users' then click on your name, find and go into '.local' and then 'bin' and within bin will whatever version of Python that was installed. +After following these steps, a console of Python will automatically open. It may say unsupported, but this is just because Positron may not yet have been updated to support the newest version of Python. Regardless the function is the same. ## AI Appendix diff --git a/getting-started/images/curl-installation.jpg b/getting-started/images/curl-installation.jpg new file mode 100644 index 0000000..6fe3675 Binary files /dev/null and b/getting-started/images/curl-installation.jpg differ diff --git a/getting-started/images/python-location.jpg b/getting-started/images/python-location.jpg new file mode 100644 index 0000000..7f9c9b6 Binary files /dev/null and b/getting-started/images/python-location.jpg differ diff --git a/getting-started/images/uv-installation.PNG b/getting-started/images/uv-installation.PNG new file mode 100644 index 0000000..01e8032 Binary files /dev/null and b/getting-started/images/uv-installation.PNG differ diff --git a/getting-started/images/windows-installation.jpg b/getting-started/images/windows-installation.jpg new file mode 100644 index 0000000..6d93668 Binary files /dev/null and b/getting-started/images/windows-installation.jpg differ diff --git a/getting-started/images/windows-interpreter.jpg b/getting-started/images/windows-interpreter.jpg new file mode 100644 index 0000000..f570c05 Binary files /dev/null and b/getting-started/images/windows-interpreter.jpg differ