Installing Python 3 - How to install/use both Python 2 and Python 3

preview_player
Показать описание


Everyone starts as a beginner. Hopefully I can help many of you out of that stage! Many people know they want to learn to program, but they are not sure which language to go with or where to start. Python is often chosen by beginners due to its "high level" nature. "High level" might make it sound like it is more complex or something, though it means the opposite. Python's syntax and other structuring is very simplistic and easy for even a beginner to follow. Many people find that they can actually read and understand what is going on with non-obfuscated Python code, even if they have no knowledge of Python or programming.

Python is certainly one of the top languages for its use, and has been referred to as the "second best language for anything." You can use Python for web development, data analysis, robotics, games, AI, and a whole lot more.

If you're looking to acquire the superpower of programming, I am here to help! If you stick around here enough, you'll find out that I like to belittle problems. Every major problem or goal can be broken down into parts. Learning to program is a massive undertaking. It can be extremely daunting for someone who is new to it. Luckily, the task of learning how to program can be broken down as well. Most programs are just combinations of a small handful of tools and operations built together to do awesome things. This is usually some if-statements in a few functions with a few loops and, boom, program! Let's take those baby steps.

In this tutorial, you are shown how to install Python 3, as well as how to maintain installations of both Python 2 and Python 3. When I was making this video, Python 3.4 beta was out, so the most current version might be 3.4. Downloading that will be fine and the tutorial information will be identical.

Bitcoin donations: 1GV7srgR4NJx4vrk7avCmmVQQrqmv87ty6
Рекомендации по теме
Комментарии
Автор

I'm from Saudi Arabia. Thank you so much. I'm glad that I have subscribed to your channel. Please carry on posting more tutorials.

mansouraltamimi
Автор

I really LIKE your talk about having superpowers. It is EXACTLY how I perceive it :)

Erni
Автор

I'm 14 trying to learn different programming languages, I am trying to do better in life now :)

trusynnii
Автор

I'm from Brazil and i am trying learn Phyton with you, learn english and phyton together seems cool.

jeffersonrodrigues
Автор

You may have both the versions(2.X and 3.X) but execution depends on how your environment variables are set, if you are running from cmd. If 2.X Version path is encountered before the path of 3.X version, it behaves as python 2.X and vice-versa

arpitthecool
Автор

Great stuff Harrison. I hope I address your name correctly, forgive me if it's incorrect.
I've just started using Python for data analysis and you site and tutorials are really an inspiration for me and for people who want to learn Python and it's applications. Awesome stuff. Your intention to assist people in this area is very noble and I wish you all the very best my friend.

rash
Автор

Run only " *py* " in terminal to use Python 3.x & Run " *py -2.7* " in terminal to use Python 2.7.

MrSushant
Автор

Thank you so much for posting. I am working on a project for my scripting class that is due at midnight and couldn't figure out how to run it to even tell if it worked

bethanyc
Автор

You as always save my day. Thanks a lot!!!
Thanks to your videos I made through my research using data analysis!

leor
Автор

I installed python2 first and after python3 but python3 didn't want to run.
I also used "#! python3" but it didn't want to run my codes as python3, and the path is in the environment variable, so it should work, but didn't .

Solution that I found:
- navigate to python27 directory and create a bat file with the following content:

cmd /k "c:\python27\python.exe" %*

-save as "python2.bat"
-stay in the same python27 directory and create another bat file for python36 with the following content:

cmd /k "c:\python36\python.exe" %*

-save as "python3.bat"
and after if I open command prompt:
- if I type "python - -version" => 2.7 as default
-if "python2 - -version" => 2.7 as runs the code
-if "python3 - -version" => 3.6 as runs the code

I hope this helps if someone has similar issue that I had today.:)

xmark
Автор

I'm confused, you didn't explain how to create the scripts to stop the error of it running. I cant run my program the way you did it I'm using Python 3.5 its weird...

calebcimeus
Автор

If you're on a Mac, try using:
- #!/usr/bin/env python2
- #!/usr/bin/env python3

davidhanson
Автор

Thanks so much I needed to help my dad with his job they switched the programing language to python 3 (they used bluezone before lol)

henryjohnson
Автор

Thank you so much for being so thorough with your explanations!

jg
Автор

In the future you should have a video for newbies and one for python 2 transfers. I felt pretty confused at a few points as someone new to python.

soyeljefe
Автор

Wow...I did good in leaving Windows behind. Linux is so much friendlier to software development. :D

RREDesigns
Автор

at 12:15 you are talking about why Python has IDLE for its IDE.  It is Integrated DeveLopment Environment.  The 'L' is added to refer to Eric Idle from Monty Python!

sjeffersonable
Автор

the download website has been updated. i think i downloaded a repair tool at first xD, but i' ve got the real thing now TY.

amanlearning
Автор

I’m brand new to computer programming and only have an iPad Pro to program on. I downloaded pythonista but there’s no absolute beginners guide for this. Any tips of where to learn? I’m interested in more making my scheduling and workflow more seamless.

dylannormandin
Автор

Thanks for your effort i wanted to do programming in my bachelors I did Cs 192 at my university and after i got C- grade i abandoned it. I have to learn it now that my maser theisis requires that I be able to pull out the data from google search volume index. 

TalzBlaze