It might be a stupid question, but so far I could not find an answer using Google.
Is an internet connection required to import libraries?
Is an internet connection required to import libraries?
|
Python
Does import require an internet connection? |
(Jan 8, 2019 10:37 AM)E V O Wrote: It might be a stupid question, but so far I could not find an answer using Google. No, if you have already them otherwise you need something like pip or pip3 to download them before start coding and importing. (And yes pip requires internet connection) https://pip.pypa.io/en/stable/ You can even simple download the module you need using the right path, but learning pip will save your time
Jan 8, 2019 10:49 AM
(This post was last modified: Jan 8, 2019 10:50 AM by E V O.)
(Jan 8, 2019 10:45 AM)FriendZone Wrote: No, if you have already them otherwise you need something like pip or pip3 to download them before start coding and importing. (And yes pip requires internet connection) Thank you for your reply. I have a programming exam tomorrow, where I will use a laptop with limited internet connection. A major part of the exam will contain operations on a data file (filetype unknown beforehand). Decoding a JSON file requires the use of the JSON library. If there is no internet connection at all, I can rule out the possibility of a JSON file. According to this all, this would mean there is an internet connection required to use import.json right? Or am I wrong since you do not need pip to import the json library Thanks again! (Jan 8, 2019 10:49 AM)E V O Wrote: Thank you for your reply. I have a programming exam tomorrow, where I will use a laptop with limited internet connection. A major part of the exam will contain operations on a data file (filetype unknown beforehand). Decoding a JSON file requires the use of the JSON library.If the computer has the JSON library installed, you do not need internet. I highly doubt your test will require installing a library using PIP, it will likely already have the required libraries. I think json comes with Python by default, anyway. (Jan 8, 2019 10:49 AM)E V O Wrote: Thank you for your reply. I have a programming exam tomorrow, where I will use a laptop with limited internet connection. A major part of the exam will contain operations on a data file (filetype unknown beforehand). Decoding a JSON file requires the use of the JSON library. I think any useful library will be already in your machine. So you won’t need internet connection, also during exams you probably won’t be able to run any command in super user mode. If I’m not enough clear: Pip install the library the first time, from this moment you will use the module or library just typing from library import Module or import library For your particular case, json is a standard python module you won’t need to download it |
|
|
| Possibly Related Threads... | |||
| Thread / Author | Replies | Views | Last Post |
| [C#] by john ronaldsadJul 20, 2022 06:49 PM | 4 | 238 |
Jul 20, 2022 06:49 PM Last Post: john ronaldsad |
| [Shell] by Emre_May 27, 2020 04:36 AM | 0 | 105 |
May 27, 2020 04:36 AM Last Post: Emre_ |
| [Python] by Johan CruyffApr 4, 2020 08:15 AM | 2 | 126 |
Apr 4, 2020 08:15 AM Last Post: lnvisible |