i downloaded python now what

I downloaded python now what. In order to use Python, it must first be installed on your computer. Follow these steps. Go to the python website www.python.org and click on the 'Download' menu choice. Next click on the Python 2.6.5 (note the version number may change) Windows Installer to download the installer. If you know you're running a 64-bit os, you can choose the x86-64 installer. Be sure to save the file that you're downloading. Once you've downloaded the file, open it. (You can also double-click on it to open it.) You may get a warning that the file is executable. Just click ok at this prompt. Once the installer starts, it will ask who to install the program for. Usually installing for all users is the best choice. Next, it needs to know where to install the file. The default choice is fine. You don't need to install the entire package, but we did. It will take a while to install. Click 'Finish' to exit the installer. After installed, you should now have a Python menu choice. Start the program by choosing IDLE (Python GUI) This starts the python shell. You can type in simple commands to see how they work. Try typing the following: In order to do more elaborate programs, normally people store all the commands in a file. To open a file to use in this way, go to File -> New Window. In this file enter your print command. Save your file by going to File -> Save. Give the file a name and put the .py suffix on it. Run your program, by going to Run -> Run Module. I downloaded python now what. Before you start, you will need Python on your computer. Check whether you already have an up to date version of Python installed by entering python in a command line window. If you see a response from a Python interpreter it will include a version number in its initial display. Generally any Python 3.x version will do, as Python makes every attempt to maintain backwards compatibility within major Python versions. Python 2.x and Python 3.x are intentionally not fully compatible. If python starts a Python 2.x interpreter, try entering python3 and see if an up to date version is already installed. On Windows, try py first - this is the relatively recent Python Launcher, which has a better chance of avoiding some of the path problems that might occur because on Windows programs don't install into any of the small set of common locations that are searched by default. The Python launcher can also let you select any of the various versions you may have installed from a single command. If you need to install Python, you may as well download the most recent stable version. This is the one with the highest number that isn't marked as an alpha or beta release. Please see the Python downloads page for the most up to date versions of Python. They are available via the yellow download buttons on that page. Windows. The most stable Windows downloads are available from the Python for Windows page. On Windows you have a choice between 32-bit (labeled x86 ) and and 64-bit (labeled x86-64 ) versions, and several flavors of installer for each. The Python core team thinks there should be a default you don't have to stop and think about, so the yellow download button on the main download page gets you the "x86 executable installer" choice. This is actually a fine choice: you don't need the 64-bit version even if you have 64-bit Windows, the 32-bit Python will work just fine. If you're running Windows XP : a complete guide to installing ActivePython is at Python on XP: 7 Minutes To "Hello World!". ShowMeDo has two videos for downloading, installing and getting started with Python on a Windows XP machine - this series talks you through the Python, ActivePython and SciPy distributions. Note that the python.org releases only support versions of Windows that are supported by Microsoft (at the time of the release), so no recent release from python.org can be used on WIndows XP. See the Python for Mac OS X page. MacOS from 10.2 (Jaguar) to 10.15 (Catalina) includes a system version of Python 2, but it is best not to consider this the Python to use for your programming tasks - install a current Python 3.x version instead. MacOS after 10.15 (Catalina) will not include a default system Python. Linux. For Red Hat, CentOS or Fedora , install the python3 and python3-devel packages. For Debian or Ubuntu , install the python3.x and python3.x-dev packages. For Gentoo , install the '=python-3.x*' ebuild (you may have to unmask it first). For other systems , or if you want to install from source , see the general download page. BeginnersGuide/Download (last edited 2019-11-10 13:28:18 by MatsWichmann ) Set-up Python. Background: The Codecademy site provides you with a development environment already set up for you to complete exercises and run your code. Now that you’ve learned how to code in Python, let’s go through the process of setting up your development environment on your computer so that you can write your own applications. While you took the Python Codecademy course, you’ve been submitting code to us which we have interpreted, run, and then sent the results back to you. This article will walk you through how to set up Python and execute code on your own computer. Sounds intimidating, but there are some nice tools to help you out that we’ll introduce you to. You’ll be flying in no time. Why build outside of Codecademy? The world of programming is massive, and it’s impossible to teach everything in one place. While Codecademy is excellent for teaching lessons, it also has limitations. For instance, it’s difficult to create large projects and share them with the world using only the tools found in Codecademy’s Python course. This guide will teach you: How to download and install python How to run python from the command line How to install python libraries using pip, a popular package manager for python (we’ll explain what that means!) Downloading Python. When you learned using the Codecademy course, you wrote the solutions in your web browser and submitted the data to us so you did not need to have Python installed on your computer. Now, you’re going to write and run actual programs on your computer. Visit the official Python downloads page and find the most recent release of Python 2.7 that corresponds to your OS (operating system). Make sure to download Python 2.x and not Python 3.x. Although Python 3 has a higher version number, it isn’t completely compatible with Python 2, the version you learned in the Codecademy course. Both versions are widely used and actively updated. After your download has completed, launch the installer. This may require that you unzip the file first depending on the version of the installer you downloaded. Follow the instructions provided by the installer to complete your Python installation. What did I just install? Computers read and execute code based on machine language which is stored in hexadecimal format. It is virtually impossible for a human to write in machine language and each processor has its own version. To make programming simpler, human-readable languages like Python were invented. The files you just installed include a Python interpreter. This interpreter converts your human-readable Python code into instructions that the computer can act on. Running Python: Once you have downloaded Python, you should be able to pull up your computer’s terminal and start running it. On Windows, search for a program called “cmd” and then launch it If you’re on a Mac or a Linux environment look for and launch the program “terminal.” You should have a command-line prompt that looks similar to this: If you downloaded Python properly, you can just type python into the prompt and hit enter to get a result like the below: From here we can type in Python code and watch it be interpreted for us on the fly. Go ahead and type some simple stuff in and watch Python work right in front of you: The command line is useful for checking simple code, but if you’re looking to build something more involved, you’ll benefit by starting with a text editor. Let’s exit out. We’ll make our own files and return to the command line

i downloaded python now what online

to run those. If you do not have a good text editor for editing code, we recommend Sublime Text, for which we have a step-by-step setup guide here. Any text editor will work but may require some additional setup. Once you’re set-up, write a simple piece of Python code like the below in your text editor. Save it, making sure the file name ends with a .py extension. We’ll name our file first.py for this example. Now let’s run your code and see what we get. Pull up your terminal again and locate the directory in which you saved your python file. Use the cd command to get there. (If you’re rusty on how to locate and change directories, refer to our Learn the Command Line course). Then type python first.py. Your terminal window should look something like this: The output of your script should print in your terminal window. If you’re seeing errors or nothing at all, make sure you’re in the same directory as your code, and that your code has a print statement that gets executed. (In other words, that you’re telling your code to actually print something.) If it printed, congratulations! You’ve now written and run a Python file all on your own! Now you’re equipped to create those projects that you’ve dreamed of. Making big projects takes lots of work. Lots and lots of work, so much so that it’s useful to have a little help from others. Thanks to the very open culture of programming, there are many open source libraries out there for you to use. Using libraries help us work quickly, and allow us not to reinvent the wheel every time we sit down to code. Using PIP to get and install Packages: As you begin to build your own applications with Python, you’ll likely use a lot of packages. The best way to install and manage them is with a package manager.The most popular and most recommended package manager for Python is called pip. Pip should already be included with your installation of Python. To check, just type pip into your command line window and see what pops up. If you get something like below, then you have pip installed. If you get an error, install the latest version of pip here. How does pip work? To download and install packages, pip searches through PyPi, the Python Package Index, a large repository of registered open source python packages. Let’s try installing a package called scrapy. It’s used to gather data from websites by “scraping” information from them. More info on Scrapy can be found on their official site. To install Scrapy, go to your terminal and enter pip install scrapy . In my terminal below, I also used “pip list” to show all my

i downloaded python now what get online

installed packages before I installed scrapy and then after it was installed to verify that I successfully installed it. From now on, we can use scrapy in any of our Python applications. In order to use it, type “import scrapy” in the python file that makes calls to it. If you decide you want to uninstall scrapy, just use the command: pip uninstall scrapy . Use pip list again to make sure you uninstalled properly. Pro Tip: If you’re working on something and wondering if there’s an easier way to do something, there’s probably already an open sourced a package that accomplishes the task. You can use a search engine or search through PyPi itself to find what you want. Can’t find what you want? Consider writing your own package and releasing it as open source so others can use it. Retrieve Information from the Web: There are many different packages that can fetch data from the web including scrapy. Let’s go through an example using one of Python’s built-in packages called urllib2. Since urllib2 is built into Python, we do not need to install it using pip. Let’s use it to grab data from Project Gutenberg, a massive collection of free eBooks. Follow the code shown below, save it and run it. Woah! That’s a lot of HTML! Let’s look at what we did. First we requested the url at Project Gutenberg’s homepage which sent a response that we printed. If we had made the same request with a web browser, the browser would have interpreted the HTML for us and displayed a pretty picture. Instead, our application read the raw HTML file for us and printed the output. This may look messy, but it can be useful for looking through websites in order to get information from them. Let’s say we wanted to count how many times an author uses a word in a book. Let’s use one of my favorites, Les Miserables by Victor Hugo. First, we find the url for the book on Project Gutenberg, open the url, read it, and then parse it to see how many times Hugo uses the word “sad.” The screenshots above use the base URL for Project Gutenberg. You should replace that URL with the correct URL for Les Miserables: http://www.gutenberg.org/files/135/135-h/135-h.htm. How many times did you count the word sad ? Looks like this is a slightly depressing book! This is just one basic usage example of urllib2 and web scrapers in general, and is meant to give you a taste of what’s possible when you use Python locally. If you’re interested, a more in-depth tutorial on urllib2 can be found in Python’s official documentation. You can refer to Python’s documentation to browse all the features of a particular package in the Python standard