mikezang
mikezang

Reputation: 2489

Python3.7 cant use import SimpleJson

I am using python3.7 with import simplejson, but I got error Unresolved import: SimpleJson, I tried to pip install simplejson,

Collecting simeplejson
Could not find a version that satisfies the requirement simeplejson (from versions: )
No matching distribution found for simeplejson

Then I tried pip install SimpleJson, it is ok:

Collecting SimpleJson
Downloading https://files.pythonhosted.org/packages/e3/24/c35fb1c1c315fc0fffe61ea00d3f88e85469004713dab488dee4f35b0aff/simplejson-3.16.0.tar.gz (81kB)
100% |████████████████████████████████| 81kB 194kB/s
Installing collected packages: SimpleJson
Running setup.py install for SimpleJson ... done
Successfully installed SimpleJson-3.16.0

But I still got error Unresolved import: SimpleJson, what can I do next? By the way, I used simplejson.loads() in my code.

Upvotes: 0

Views: 2971

Answers (1)

blhsing
blhsing

Reputation: 106445

SimpleJson is the package's distribution name. When you actually import it you should import simplejson instead of import SimpleJson.

Upvotes: 1

Related Questions