Learn artificial intelligence with Dabai - Anaconda

Welcome to click "The Beauty of Algorithms and Programming"↑Follow us!

This article was first published on the WeChat public account: "The Beauty of Algorithms and Programming", welcome to pay attention and learn more about this series of blogs in time.

My name is Da Bai, a second-year undergraduate student, and I am currently studying computer science in one or two universities in China. I heard that artificial intelligence is very popular in recent years, and news reports that artificial intelligence salary is very high, so I also want to get into artificial intelligence. But helplessly, I didn't know how to get started, so I asked Teacher Xiaohei for advice.

Teacher Xiaohei worked in the company for a while before entering the university. Is a technology control, especially full of enthusiasm for new technologies. In addition, he is also a very serious and responsible teacher. He is also planning to open an introductory course on artificial intelligence recently. Since it is aimed at undergraduate students from ordinary two colleges and universities, the students' foundation is relatively weak, especially mathematics courses, so I want to open them. Artificial intelligence courses, and want to achieve good results is a very difficult thing, it must be taught in a simple and easy to understand way, and can not involve too many mathematical formulas.

One day, Dabai found Teacher Xiaohei.

Dabai: Teacher Xiaohei, recently I want to learn artificial intelligence in Gaoda, can you teach us a few lessons, let's get started and feel its charm.

Xiaohei: Since you want to learn so much, please gather some interested students. Let’s form a small class to learn together. I’ll tell you a few times and take everyone to a door.

Before long, some students who are interested in artificial intelligence came one after another.

Da Bai: Thank you, teacher. So what algorithm should we learn first?

Xiao Hei: No rush, no rush, we still have a lot of preparatory work to do before we formally learn artificial intelligence. The first and most important thing is the configuration of the development environment and the learning of the programming language.

In recent years, due to the rapid development of artificial intelligence technology, very good results have been achieved in various fields, and at the same time, python has become the first language in the field of artificial intelligence. Therefore, before formal learning, it is very necessary for us to seriously introduce the python programming language.

In this section, we focus on the configuration of the python programming environment. The python programming environment mainly involves two softwares: anaconda and jupyter notebook, where anaconda is the basic environment for python development, and jupyter notebook is the editor of python. Both are artifacts, and both are worthy of our understanding.

How to download anaconda?

Follow the WeChat public account of "The Beauty of Algorithms and Programming" and reply to "anaconda" to get the download link.

how to install?

Right-click and select "Run as administrator", then follow the prompts, all defaults, and continue to the end.

How does it work?

Start -> Anaconda Prompt -> Right click and select "Run as administrator"

It will enter the command line interface, and all subsequent operations will be performed on this interface.

What is anaconda?

Anaconda can be said to be a weapon, mainly reflected in the following aspects:

1) It comes with a python interpreter and some basic toolkits. It can be said that as long as anaconda is installed, all the problems of the python development environment are solved.

2) Comes with some commonly used scientific computing function libraries.

3) Powerful package management software.

When doing software development, we inevitably have to use third-party libraries written by others, so we have to download these libraries, and some of these third-party libraries will inevitably use libraries written by predecessors, so there will be With very complex dependencies, if we deal with these dependencies ourselves, it will become very troublesome. And package management can help us solve these problems very conveniently. A simple command can achieve fast package download and management.

conda install package name

4) Flexible environment switching.

When doing development, I often read open source projects on the Internet, and some projects are written in python2, others are written in python3, etc. You will find that different projects will use different versions of the library, then on my computer Should I install python2 or python3? How should I choose the version of other libraries? I believe this is a very troublesome thing for beginners. With anaconda, you will no longer have to worry about it, because anaconda installs both python2 and python3, and it can configure a separate operating environment for each software to run.

Anaconda can set up different environments for different software to run, which is its ultimate solution to the above problems.

Therefore, when we are doing development, we first establish the independent development environment we need, such as python3.0, panda0.22, etc.

Enter on the command line:

conda create -n py3 python=3 

Indicates the establishment of a development environment with the environment name 'py3', where python uses the python3 version.

conda env list

The command can view the several environments we have currently established. The * sign indicates which environment is currently in. As you can see from the example above, it is currently the base environment.

In addition, there are two very commonly used commands:

activate py3 to enter the py3 environment.

deactivate leaves the current environment.

Epilogue

This article introduces the configuration of the python development environment. You will find that it is very simple. You can solve all problems by installing anaconda software, which is really convenient.

The tasks you need to complete in this section are:

1) Download and install anaconda;

2) Open the anaconda command line interface;

3) Use the 'conda create -n py3 python=3 ' command to create a py3 environment;

4) Use the 'activate py3' command to enter the py3 environment.

This is the first step in getting started with artificial intelligence, so what are you waiting for? Welcome to scan the QR code below to join and start artificial intelligence with Dabai.

Next time we will introduce another artifact Jupyter Notebook to you, please continue to pay attention.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324531612&siteId=291194637