Python is ranked as the second most popular programming language in the Tiobe index according to Zdnet.com. Python has gained popularity among the growing tech areas of machine learning and data science—and it has a simple, elegant syntax that is easy to learn.
If you want to start learning Python—or you sit on another computer where Python isn’t installed, yet, you may ask the question:
How to Run Python Without Installation?
The easiest option is to run Python on Google’s Colab servers. This doesn’t require any programs to be installed on your local machine. I recommend using Chrome for this. Simply start typing
colab.research in the search bar and Chrome will fill in the rest.
You can also click the following link:
Click on the “Welcome to Colaboratory” link and you’ll be greeted with a few beginner tutorials and code snippets in basic Python, Data Science, and Machine Learning. This is a great way to get an easy introduction to data visualization using the Python libraries NumPy and matplotlib. There’s also a beginner’s introduction to machine learning using TensorFlow and machine learning example code in Python notebooks. While this is convenient and provides access to very powerful tools and supporting libraries, there can be some noticeable pauses while code is executed across your internet connection to the Colab servers. You can greatly improve performance by setting up a Python environment locally on your computer.
Alternatively, you can also use a …
Trinket Interactive Code Shell in Your Browser
Type in any Python script you’d like to execute and hit “Run”.
- How to Install Python?
- How to Check Your Python Version?
- How to Install Python on Windows 7?
- How to Run Python in Your Browser?
- How to Embed a Python Interpreter in Your Website?
How do I run Python on my PC?
In order to learn Python, you have to run Python on your computer. This can be daunting for new programmers-to-be, but I will show you a few quick and easy ways to get started quickly.
If you are lucky enough to be running Linux, running Python locally couldn’t be easier. Open up a terminal window and your favorite text editor and save your Python code in a
*.py file. You can execute the
*.py file by typing
and pressing enter. This is running “vanilla” Python- a bare-bones, no-nonsense way to go. If you want to write code in an editor that makes the code easier to read, you can use Sublime Text (with a license fee after the trial period) or a free editor under the GNU license.
However, if you are on Windows or Mac, or you want an integrated development environment (IDE) then Anaconda is a great option.
Anaconda | The World’s Most Popular Data Science Platform
Anaconda is a package manager for Python. But what exactly does that mean? A package manager stores programs on an internet site. Anaconda stores these programs as binary-executable files. Anaconda also provides a graphical user interface (GUI) for interacting with these programs. Another popular option is Pypi. Pypi stores source code, files that are compiled into binary-executable files (a.k.a. programs.) Pypi or pip for short, does not play well with the Anaconda environment. Anaconda, however, manages the dependencies between programs very well. Because of this, I recommend installing Anaconda first and then installing pip if and when you need it. Go to anaconda.com and click on “products” and then “individual edition.” Click on the installer appropriate for your operating system (Windows, Mac, Linux, etc.) You’ll need 457 MB of storage space to install Anaconda.
Python For Beginners
After you’ve installed Anaconda, start a terminal window. On Windows, click on the start button on the lower left of your screen and type “anaconda” in the search bar. Click on Anaconda Navigator to start the GUI. From there, you can install various programs such as Jupyter Lab for an interactive computing environment, SciPy to run an IDE, and even R Studio to run R (which isn’t Python!) Another advantage of Anaconda Navigator, is that it makes it easy to set up environments from a point and click interface.
What Are Python Environments?
Environments are isolated containers on your computer. This allows you to run different versions of programs independently from each other so that they don’t cause conflicts. You can even run different versions of Python! So, why is this important? There are a very large number of programs and libraries that you can add to your Python project. Each library often requires other libraries to function properly, these are called dependencies. Depending upon when the library was written, it will depend upon particular versions (i.e. it may not run with later versions of the same libraries.) Luckily, Anaconda and Pypi / pip manage this for you. Setting up environments prevents version conflicts between libraries (your programs run without causing problems with other programs.)