Getting Started In Python | Learning Python | Setting Up

in #utopian-io7 years ago (edited)

Getting Started In Python | Learning Python | Introduction


Image Source

Welcome To The New Series

Welcome to the new series which is about python. In this post I just wanted to give a quick start to python users and In the next posts we'll be getting into Python!

Python is one of the easiest and coolest languages I have encountered. Some people might say that it is slower compared to other languages which is partially true. Yes it is slow but it is faster than most than languages including nodeJS. You can do hell lotta things in Python. Some things are mentioned below:

  • Web Development
  • Game Development
  • Hacking
  • AI / Machine Learning / Deep Learning
  • Networking
  • Interacting with blockchain
  • much more..!

As you can see above, You can do almost everything from Hacking To Machine Learning. One of the things that I found very interesting is that it is very easy to get grip of Python.

I wanted to start this series because I saw many people were interested in Python but they didn't knew where to start learning it. I will try to make this series as beginner as possible. Before starting I would like to tell you that you won't be interacting with blockchain from the start and it will long time to get there so get ready for it.

From Where To Start?

Installing Ubuntu

First of all you need to install Ubuntu. I am gonna use Ubuntu 16.04 LTS (64 Bit) for this series. You can also create virtual machines on softwares like VMware or VirtualBox but I won't recommend it because it is laggy and buggy and I don't like both of those things. For beginners I would recommend installing Linux as it will give the feel about the environment they are working in.


Image Source

Installing Python (With Anaconda)


Image Source

Now after installing Ubuntu (which you can by downloading ISO and installing it by making Bootable USB). Open the terminal. You can open terminal by going to Dash at top left and searching "terminal". You can do two things to install python.

  • Installing directly
  • Installing via anaconda

You must be not familiar with above terms, I just wanted to let you know that their are two methods or more. I will be using anaconda to download python. Anaconda is a package which comes ton of great tools which you'll be using ahead. You can install anaconda by using these commands in terminal.

wget https://repo.continuum.io/archive/Anaconda3-5.1.0-Linux-x86_64.sh

If you're reading this post not so long after posting it, the above link will work. However if it doesn't you can go to Anaconda's Download Pageand right click on download button for Python 3.6 and copy it.

It will start installing, in this process it will ask you couple of times for different permissions, type 'yes' on all of them. There should be message like below
Do you wish the installer to prepend the Anaconda3 install location to PATH in your /home/umais/.bashrc ? [yes|no]
Make sure you type "yes" on that. Cause if you don't do you will have to do another step. If you have typed "yes" then after some time the installation will be complete.

After that source the ~/.bashrc file and make sure Anaconda was installed correctly. You can do this by typing:
source ~/.bashrc
You can check the installation by typing:
conda --version
If it returns conda 4.4.10then conda have been installed successfully!
You can also check Python by typing:Python3 -Vand it will returnPython 3.6.4 :: Anaconda, Inc.

If you somehow forgot to type "yes" when
Do you wish the installer to prepend the Anaconda3 install location to PATH in your /home/amos/.bashrc ? [yes|no]
prompt or it went passed way too quickly then type:
nano ~/.bashrc
and at the end of the file add new line
export PATH="/home/user/anaconda3/bin:$Path"
After that you can source and check your installation by above step.

Installing Code Editor (PyCharm)


Image Source

Now you'll be needing a good code editor. You can use VSCode but I find it hard to use so I use PyCharm and it is working flawlessly for me. You can download from here. Make sure you download the community version.

After downloading it you can install it very easily. To open the Pycharm you have to open the terminal again and type:
cd pycharm-community-2017.3.3
After "cd" type the name of the folder where you installed PyCharm.After that type:
cd bin
Then
./pycharm.sh
And PyCharm will start. You can play around with it till I post next part.

Finishing Off

Now that you have three essential things that you needed setup. I'll leave this part here. In the next part we'll be getting further into learning Python so stay tuned for that.

#Python-Team2k18



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Your contribution cannot be approved because it does not follow the Utopian Rules.

Explanation:

  • part 1 was a Python intro, but with partially wrong & incomplete info. You shouldn't focus on "hacking", you will end up in jail for it, never hack! You also missed the opportunity to mention Python is great for automation tasks, command line interfacing and for example game development, not to forget about data sciences and analysis, to name a few. It's a general purpose language. And yes, it is very cool
  • part 2 was about needing to install ubuntu, which is not needed at all and the details for installing ubuntu are missing. I told you to use Ubuntu, because I can't help you via Discord on a Windows system because I don't run Windows myself, and because Python on Windows can be tricky (for beginners),
  • part 3 about installing Anaconda, at which section you "got inspired by" Amos' article and didn't understand fully yourself, I think. ( source vs reboot? What does a .bashrc file do? etc)
  • part 4 about PyCharm where you failed to see that running is not the same as installing. The .sh file is not for running PyCharm, but a Shell Script to install it with and run afterwards. If you would have understood this all, you wouldn't have written this as it is now.

Good luck studying Python!

You can contact us on Discord.
[utopian-moderator]

Hey @scipio, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!