DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report
  1. DZone
  2. Data Engineering
  3. AI/ML
  4. Python Machine Learning Environment Setup 2018

Python Machine Learning Environment Setup 2018

Let's take a look at a Python Machine Learning environment setup as well as explore different Python libraries.

Rinu Gour user avatar by
Rinu Gour
·
Oct. 02, 18 · Tutorial
Like (3)
Save
Tweet
Share
5.36K Views

Join the DZone community and get the full member experience.

Join For Free

How to Install Python

Before anything else, you will need to Install Python on your machine. So, here are the steps to install Python.

Plain Download

You can download from the official website:

https://www.python.org/downloads/

At the time of writing, the latest version of Python is Python 3.7. This is what the installer looks like:

Python Machine Learning Environment Setup

Installing With Anaconda

Or you can install it with Anaconda:

https://www.anaconda.com/download/

This downloads Anaconda for us. Now to install it, we run the installer:

Python Machine Learning Environment Setup

Python Machine Learning Environment Setup

Python Machine Learning Environment Setup

Python Machine Learning Environment Setup

And for the final options:

Python Machine Learning Environment Setup

And then, it installs Anaconda:

Python Machine Learning Environment Setup

Starting and Updating Anaconda

To confirm that your Anaconda environment is up to date, follow these steps:

1. Open Anaconda Prompt and type the following:

  1. (base) C:\Users\Ayushi>conda -V

conda 4.5.8

2. Now the following command tells you about your Python environment:

  1. (base) C:\Users\Ayushi>python -V

Python 3.6.5 :: Anaconda, Inc

3. Then, to confirm that the conda environment you hold is up to date:

  1. (base) C:\Users\Ayushi>conda update conda

Solving environment: done

# All requested packages already installed.

  1. (base) C:\Users\Ayushi>conda update anaconda

Solving environment: done

# All requested packages already installed.

Installing Needed Python Libraries

Working with Machine Learning, we will need a few Python Libraries often. Here’s a list of some of those-

NumPy

Python Machine Learning Environment Setup

NumPy, a Python library that will let you handle multi-dimensional arrays and matrices. It also offers multiple high-level mathematical functions to operate on these.

You can install it as:

  1. conda install numpy

SciPy

Python Machine Learning Environment Setup

SciPy is a scientific and technical computing Python library that is free and open-source. Install it as:

  1. conda install scipy

Matplotlib

Python Machine Learning Environment Setup

Matplotlib, a Python library for plotting and has NumPy as its numerical mathematics extension. Install it as:

  1. conda install matplotlib

pandas

Python Machine Learning Environment Setup

pandas is a software library for Python that comes in handy when working with data manipulation and analysis. Install it with the following command-

  1. conda install pandas

statsmodels

Python Machine Learning Environment Setup

This is a Python package that lets users explore data, estimate statistical models, and carry out statistical tests. You can install it as:

  1. conda install statsmodels

seaborn

Python Machine Learning Environment Setup

This is a Python library for data visualization and is based on Matplotlib. It offers a high-level interface for plotting statistical graphs that are attractive and informative. You can install it with the following command:

  1. conda install seaborn

scikit-learn

Python Machine Learning Environment Setup

This is a free software ML library for Python. It offers facilities like classification, regression, and clustering algorithms.

To find out which version of a library you’re using, you can run the following piece of code in the interpreter:

  1. >>> import scipy
  2. >>> scipy.__version__

‘1.1.0’

So, this was all in Python Machine Learning Environment Setup. Hope you like our explanation.

Conclusion

In this Python Machine Learning Environment Setup, we discussed how to install Python. Moreover, we saw the starting and updating of Anaconda. Also, in this Python Machine Learning Environment Setup, we learned about the need libraries. If you follow all the steps mentioned above, you will successfully set up a Machine Learning environment for Python at a beginner level. Still, if you have any doubts regarding Python Machine Learning Environment Setup, ask in the comments section.

Machine learning Python (language)

Published at DZone with permission of Rinu Gour. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Getting a Private SSL Certificate Free of Cost
  • 19 Most Common OpenSSL Commands for 2023
  • Using Swagger for Creating a PingFederate Admin API Java Wrapper
  • How To Best Use Java Records as DTOs in Spring Boot 3

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: