Python Forum
Error message when importing jsonlines library
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error message when importing jsonlines library
#1
I'm using Jupyter Notebooks with version 2.7

I'm trying to import three libraries, requests, json, and jsonlines.

When I post
import requests
import json
import jsonlines
I get an error message saying
ImportErrorTraceback (most recent call last)
<ipython-input-1-8eab60077a08> in <module>()
      1 import requests
      2 import json
----> 3 import jsonlines

ImportError: No module named jsonlines
But there is a jsonlines library. https://jsonlines.readthedocs.io/en/latest/

Can anyone tell me what's going on? Why am I getting an error message?

Thanks
Reply
#2
json module, for example, is included in Python distribution, module jsonlines isn't.
The link you posted has a section titled installation. So you need to install that module first, if you haven't done so yet.
Reply
#3
Thanks. No I'll go and try to figure out how to install a library. :)
Reply
#4
It's probably as simple as pip install jsonlines, pip being the python package manager (...which might already be installed, I can't remember what version of python started including pip).
Reply
#5
(May-14-2018, 08:42 PM)nilamo Wrote: I can't remember what version of python started including pip
The first time pip did ship with Python was 2.7.9 and 3.4 for Python 3.
@vakil67 you should be using Python 3,we have several tutorial about this Windows | Linux | Anaconda.
Reply
#6
I had to use the Anaconda Prompt, but I installed it. The script I need is running right now. Thanks everyone.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Error message about iid from RandomizedSearchCV Visiting 2 934 Aug-17-2023, 07:53 PM
Last Post: Visiting
  Error in blend_modes library talgreen 6 939 Jul-01-2023, 05:32 PM
Last Post: talgreen
  pyarrow error when importing pandas sravva 1 886 Jun-06-2023, 05:09 PM
Last Post: snippsat
  Another Error message. the_jl_zone 2 943 Mar-06-2023, 10:23 PM
Last Post: the_jl_zone
  python requests library .JSON() error mHosseinDS86 6 3,253 Dec-19-2022, 08:28 PM
Last Post: deanhystad
  python standard way of importing library mg24 1 872 Nov-15-2022, 01:41 AM
Last Post: deanhystad
  email Library: properly send message as quoted-printable malonn 3 1,267 Nov-14-2022, 09:31 PM
Last Post: malonn
  Problem with importing python-telegram library into the project gandonio 1 1,516 Nov-01-2022, 02:19 AM
Last Post: deanhystad
  Mysql error message: Lost connection to MySQL server during query tomtom 6 15,685 Feb-09-2022, 09:55 AM
Last Post: ibreeden
  Install any library via pip get an error cannot import name 'SCHEME_KEYS' from 'pip. Anldra12 2 10,492 Jan-04-2022, 01:05 PM
Last Post: Anldra12

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020