python how to import module

#IGNORE STEP 1, 2 AND 3 IF YOU ALREADY HAVE PIP INSTALLED
#REFER TO THE SOURCES IF YOU HAVE AN ERROR WITH YOUR PIP FOR WINDOWS
Step 1) Go to your command terminal, (aka command prompt, MacOScommandline, Command line for linux)
Step 2) You will have to install something called pip. 

#Windows
py -m pip install --upgrade pip #I mainly use windows
#If an error for window says "no recognised as internal or external command"
#Please refer to the video in the sources.

#Linux
apt-get install python3-pip

#MacOs
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo easy_install pip

step 3) #Great, now you do not need to re install, meaning do the last 2 steps
#Ever again until you delete pip. 

pip install [name of module]

step 4) #implementing it into python

#Method 1
from [name of module] import [package name] #Will derrive only the package from that module

#Method 2
import [name of module] # will incorporate the whole package

#How to change the name used for your packages

import [name of module] as [name of your choice]

from [name of module] import [package name] as [name of package of your choice]

#Good luck to all my future Software engineers.

3.71
7
Phoenix Logan 186120 points

                                    import numpy as np
import pandas as pd
import matplotlib.pyplot as plt

3.71 (7 Votes)
0
4.29
7
A-312 69370 points

                                    import random
from os import name, system
import time as t

4.29 (7 Votes)
0
Are there any code examples left?
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source