search
HomeBackend DevelopmentPython TutorialAnaconda usage tutorial (picture and text)

Anaconda is a data science and machine learning platform for the Python and R programming languages. It is designed to make the process of creating and distributing projects simple, stable, and replicable across systems, and is available on Linux, Windows, and OSX.

Anaconda usage tutorial (picture and text)

Anaconda is a Python-based platform that manages major data science packages, including panda, scikit-learn, SciPy, NumPy, and Google's machine learning platform TensorFlow. It is packaged with conda (a pip-like installation tool), Anaconda navigator (for GUI experience), and spyder (for IDE).

This tutorial will introduce you to some basics of Anaconda, conda, and spyder of the Python programming language and introduce you to the concepts you need to start creating your own projects. (Recommended: Python Tutorial)

Basic knowledge of conda

Conda is an Anaconda package management and environment tool and the core of Anaconda. It's a lot like pip, except it's designed for Python, C, and R package management. Conda also manages virtual environments in a way similar to virtualenv, which I've covered here.

Confirm installation

The first step is to confirm the installation and version on your system. The command below will check if Anaconda is installed and print the version to the terminal.

$ conda --version

You should see results similar to the ones below. I currently have version 4.4.7 installed.

$ conda --version
conda 4.4.7

Update version

Conda can be updated using the update parameter of conda, as shown below.

$ conda update conda

This command will update to the latest version of conda.

Proceed ([y]/n)? y

Downloading and Extracting Packages
conda 4.4.8: ########################################################### | 100%
openssl 1.0.2n: ######################################################## | 100%
certifi 2018.1.18: ##################################################### | 100%
ca-certificates 2017.08.26: ############################################ | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

By running the version parameter again, we see that my version has been updated to 4.4.8, which is the latest version of the tool.

$ conda --version
conda 4.4.8

Create a new environment

To create a new virtual environment, you can run the following series of commands.

$ conda create -n tutorialConda python=3
$ Proceed ([y]/n)? y

You can see below the packages installed into the new environment.

Downloading and Extracting Packages
certifi 2018.1.18: ##################################################### | 100%
sqlite 3.22.0: ######################################################### | 100%
wheel 0.30.0: ########################################################## | 100%
tk 8.6.7: ############################################################## | 100%
readline 7.0: ########################################################## | 100%
ncurses 6.0: ########################################################### | 100%
libcxxabi 4.0.1: ####################################################### | 100%
python 3.6.4: ########################################################## | 100%
libffi 3.2.1: ########################################################## | 100%
setuptools 38.4.0: ##################################################### | 100%
libedit 3.1: ########################################################### | 100%
xz 5.2.3: ############################################################## | 100%
zlib 1.2.11: ########################################################### | 100%
pip 9.0.1: ############################################################# | 100%
libcxx 4.0.1: ########################################################## | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use:
# > source activate tutorialConda
#
# To deactivate an active environment, use:
# > source deactivate
#

Activation

Very similar to virtualenv, you have to activate the newly created environment. The following command will activate the environment on Linux.

source activate tutorialConda
Bradleys-Mini:~ BradleyPatton$ source activate tutorialConda
(tutorialConda) Bradleys-Mini:~ BradleyPatton$

Installing packages

The conda list command will list the packages currently installed into the project. You can add additional packages and their dependencies using the install command.

$ conda list
# packages in environment at /Users/BradleyPatton/anaconda/envs/tutorialConda:
#
# Name Version Build Channel
ca-certificates 2017.08.26 ha1e5d58_0
certifi 2018.1.18 py36_0
libcxx 4.0.1 h579ed51_0
libcxxabi 4.0.1 hebd6815_0
libedit 3.1 hb4e282d_0
libffi 3.2.1 h475c297_4
ncurses 6.0 hd04f020_2
openssl 1.0.2n hdbc3d79_0
pip 9.0.1 py36h1555ced_4
python 3.6.4 hc167b69_1
readline 7.0 hc1231fa_4
setuptools 38.4.0 py36_0
sqlite 3.22.0 h3efe00b_0
tk 8.6.7 h35a86e2_3
wheel 0.30.0 py36h5eb2c71_1
xz 5.2.3 h0278029_2
zlib 1.2.11 hf3cbc9b_2

To install panda into the current environment, you need to execute the following shell command.

$ conda install pandas

It will download and install relevant packages and dependencies.

The following packages will be downloaded:

package | build
---------------------------|-----------------
libgfortran-3.0.1 | h93005f0_2 495 KB
pandas-0.22.0 | py36h0a44026_0 10.0 MB
numpy-1.14.0 | py36h8a80b8c_1 3.9 MB
python-dateutil-2.6.1 | py36h86d2abb_1 238 KB
mkl-2018.0.1 | hfbd8650_4 155.1 MB
pytz-2017.3 | py36hf0bf824_0 210 KB
six-1.11.0 | py36h0e22d5e_1 21 KB
intel-openmp-2018.0.0 | h8158457_8 493 KB
------------------------------------------------------------
Total: 170.3 MB

The following NEW packages will be INSTALLED:

intel-openmp: 2018.0.0-h8158457_8
libgfortran: 3.0.1-h93005f0_2
mkl: 2018.0.1-hfbd8650_4
numpy: 1.14.0-py36h8a80b8c_1
pandas: 0.22.0-py36h0a44026_0
python-dateutil: 2.6.1-py36h86d2abb_1
pytz: 2017.3-py36hf0bf824_0
six: 1.11.0-py36h0e22d5e_1

By executing the list command again, we can see that the new package is installed in the virtual environment.

$ conda list
# packages in environment at /Users/BradleyPatton/anaconda/envs/tutorialConda:
#
# Name Version Build Channel
ca-certificates 2017.08.26 ha1e5d58_0
certifi 2018.1.18 py36_0
intel-openmp 2018.0.0 h8158457_8
libcxx 4.0.1 h579ed51_0
libcxxabi 4.0.1 hebd6815_0
libedit 3.1 hb4e282d_0
libffi 3.2.1 h475c297_4
libgfortran 3.0.1 h93005f0_2
mkl 2018.0.1 hfbd8650_4
ncurses 6.0 hd04f020_2
numpy 1.14.0 py36h8a80b8c_1
openssl 1.0.2n hdbc3d79_0
pandas 0.22.0 py36h0a44026_0
pip 9.0.1 py36h1555ced_4
python 3.6.4 hc167b69_1
python-dateutil 2.6.1 py36h86d2abb_1
pytz 2017.3 py36hf0bf824_0
readline 7.0 hc1231fa_4
setuptools 38.4.0 py36_0
six 1.11.0 py36h0e22d5e_1
sqlite 3.22.0 h3efe00b_0
tk 8.6.7 h35a86e2_3
wheel 0.30.0 py36h5eb2c71_1
xz 5.2.3 h0278029_2
zlib 1.2.11 hf3cbc9b_2

For packages that are not part of the Anaconda repository, you can use the typical pip command. Since most Python users are familiar with these commands, I won't discuss them here.

Anaconda Navigator (Anaconda Navigator)

Anaconda includes a GUI-based navigation application that makes development easy. It includes spyder IDE and jupyter notebook as pre-installed projects. This allows you to quickly start a project from the GUI desktop environment.

Anaconda usage tutorial (picture and text)

In order to start working from the newly created environment in the Navigator, we must select our environment under the toolbar on the left.

Anaconda usage tutorial (picture and text)

Then we need to install the tools we want to use. For me, this is the spyder IDE. This is where I do most of my data science work, and for me, it's a productive Python IDE. Just click the install button on spyder's dock tile. The navigator will do the rest.

Anaconda usage tutorial (picture and text)

After installation, you can open the IDE from the same dock tile. This will launch spyder from your desktop environment.

Anaconda usage tutorial (picture and text)

spyder

Anaconda usage tutorial (picture and text)

spyder is Anaconda’s default IDE for standard and Data science projects are very powerful. spyder IDE has an integrated IPython notebook, a code editor window and console window.

Anaconda usage tutorial (picture and text)

#Spyder also includes standard debugging features and a variable explorer, which can help when things don't go exactly as planned.

in conclusion

anaconda is a great environment for data science and machine learning in Python. It comes with a carefully curated set of software packages designed to work together for a powerful, stable, and replicable data science platform. This allows developers to distribute their content and ensure the same results across different machines and operating systems. It comes with built-in tools to make life easier, like a navigator that allows you to easily create projects and switch environments. It is my first choice for developing algorithms and creating financial analysis projects. I even find myself using it on most Python projects because I'm familiar with the environment. If you want to start learning Python and data science, Anaconda is a great choice.

The above is the detailed content of Anaconda usage tutorial (picture and text). For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Python: Automation, Scripting, and Task ManagementPython: Automation, Scripting, and Task ManagementApr 16, 2025 am 12:14 AM

Python excels in automation, scripting, and task management. 1) Automation: File backup is realized through standard libraries such as os and shutil. 2) Script writing: Use the psutil library to monitor system resources. 3) Task management: Use the schedule library to schedule tasks. Python's ease of use and rich library support makes it the preferred tool in these areas.

Python and Time: Making the Most of Your Study TimePython and Time: Making the Most of Your Study TimeApr 14, 2025 am 12:02 AM

To maximize the efficiency of learning Python in a limited time, you can use Python's datetime, time, and schedule modules. 1. The datetime module is used to record and plan learning time. 2. The time module helps to set study and rest time. 3. The schedule module automatically arranges weekly learning tasks.

Python: Games, GUIs, and MorePython: Games, GUIs, and MoreApr 13, 2025 am 12:14 AM

Python excels in gaming and GUI development. 1) Game development uses Pygame, providing drawing, audio and other functions, which are suitable for creating 2D games. 2) GUI development can choose Tkinter or PyQt. Tkinter is simple and easy to use, PyQt has rich functions and is suitable for professional development.

Python vs. C  : Applications and Use Cases ComparedPython vs. C : Applications and Use Cases ComparedApr 12, 2025 am 12:01 AM

Python is suitable for data science, web development and automation tasks, while C is suitable for system programming, game development and embedded systems. Python is known for its simplicity and powerful ecosystem, while C is known for its high performance and underlying control capabilities.

The 2-Hour Python Plan: A Realistic ApproachThe 2-Hour Python Plan: A Realistic ApproachApr 11, 2025 am 12:04 AM

You can learn basic programming concepts and skills of Python within 2 hours. 1. Learn variables and data types, 2. Master control flow (conditional statements and loops), 3. Understand the definition and use of functions, 4. Quickly get started with Python programming through simple examples and code snippets.

Python: Exploring Its Primary ApplicationsPython: Exploring Its Primary ApplicationsApr 10, 2025 am 09:41 AM

Python is widely used in the fields of web development, data science, machine learning, automation and scripting. 1) In web development, Django and Flask frameworks simplify the development process. 2) In the fields of data science and machine learning, NumPy, Pandas, Scikit-learn and TensorFlow libraries provide strong support. 3) In terms of automation and scripting, Python is suitable for tasks such as automated testing and system management.

How Much Python Can You Learn in 2 Hours?How Much Python Can You Learn in 2 Hours?Apr 09, 2025 pm 04:33 PM

You can learn the basics of Python within two hours. 1. Learn variables and data types, 2. Master control structures such as if statements and loops, 3. Understand the definition and use of functions. These will help you start writing simple Python programs.

How to teach computer novice programming basics in project and problem-driven methods within 10 hours?How to teach computer novice programming basics in project and problem-driven methods within 10 hours?Apr 02, 2025 am 07:18 AM

How to teach computer novice programming basics within 10 hours? If you only have 10 hours to teach computer novice some programming knowledge, what would you choose to teach...

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor