I try to use the Python jq module:
#!/usr/bin/python3
# Python 3.4
#--------------------------
import datetime
import sys
import urllib.request
import urllib.error
import time
from jq import jq
When I run it on the command line:
# ./daemon.py
it says this:
Traceback (most recent call last):
File "./daemon.py", line 10, in <module>
from jq import jq
ImportError: No module named 'jq'
List of installed python packages:
# pip search jq
shows this:
...
jq (0.1.6) - jq is a lightweight and flexible JSON processor.
...
So why can't my program import the jq module?
pip search
searches through available packages. To list installed packages, use pip list
.
Try installing the jq
module with pip install jq
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.