Install and import in Jupyter Notebook

  • Thread starter Thread starter fog37
  • Start date Start date
  • Tags Tags
    install
Click For Summary
SUMMARY

The discussion focuses on the use of the import and install commands in Jupyter Notebook when working with Python. The import command is utilized to access pre-installed modules and libraries within the local environment, while the install command requires an active internet connection to download new modules that are not already present. Users commonly opt for the Anaconda distribution, which includes many essential libraries pre-installed, facilitating a smoother experience in Jupyter Notebook.

PREREQUISITES
  • Understanding of Python programming language
  • Familiarity with Jupyter Notebook interface
  • Knowledge of Anaconda distribution for Python
  • Basic concepts of module and library management in Python
NEXT STEPS
  • Explore how to manage Python packages using pip and conda
  • Learn about Jupyter Notebook extensions for enhanced functionality
  • Investigate the differences between local and cloud-based Jupyter Notebook environments
  • Study best practices for organizing Python libraries and modules in Jupyter
USEFUL FOR

This discussion is beneficial for Python developers, data scientists, and educators using Jupyter Notebook for data analysis and visualization, as well as anyone interested in optimizing their Python environment setup.

fog37
Messages
1,566
Reaction score
108
TL;DR
install and import commands meaning
Hello again,
  • import command: when working with Jupyter notebooks and Python, the command import is used to import both modules and libraries into the working environment, i.e. the notebook itself, correct? This means that the module or library is already installed, i.e. all the code is already present in our computer (it was provided when we downloaded Jupiter or the distribution that Jupyter comes from), and we are making its capabilities accessible from within the notebook...
  • install command: In Jupyter notebook, when we use the install command, will the module/library and all its code be uploaded from the internet? Does that mean there must be an active internet connection to perform this installation task?
Thanks!
 
Technology news on Phys.org
import is a python statement to link python code to your python script.

Several languages including Python, Java and Julia use this approach to attach external code to a program.

I've used Jupyter notebooks and they didn't require an internet connection as the server ran on my local machine. However some Python modules might need to be downloaded if they are already present.

Many people choose the Anaconda distro with Jupyter notebooks so that most modules of interest are already installed and ready to use.

https://lectures.quantecon.org/py/getting_started.html
 
The import command is what's used for a specific Jupyter notebook. It loads libraries from what is already installed on your computer.

The install command does reach out to the internet to load new modules that you haven't previously installed. Once they're loaded, you can then use them in an import.

As @jedishrfu suggested, the Anaconda distro is the best starting point and contains many pre-loaded libraries and modules.
 
  • Like
Likes   Reactions: jedishrfu and fog37

Similar threads

  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
7
Views
3K
Replies
3
Views
3K
  • · Replies 12 ·
Replies
12
Views
9K
Replies
6
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
3
Views
2K