總所周知 ujson
要比 json
模塊高效,可是安裝也太麻煩了。之前在 Windows7
中使用 Python2.x
的第三方模塊 ujson
,使用pip install ujson
安裝時(shí)沒(méi)有問(wèn)題的,換成 Windows10
的時(shí)候報(bào)錯(cuò)了。
潁州網(wǎng)站制作公司哪家好,找創(chuàng)新互聯(lián)建站!從網(wǎng)頁(yè)設(shè)計(jì)、網(wǎng)站建設(shè)、微信開(kāi)發(fā)、APP開(kāi)發(fā)、成都響應(yīng)式網(wǎng)站建設(shè)公司等網(wǎng)站項(xiàng)目制作,到程序開(kāi)發(fā),運(yùn)營(yíng)維護(hù)。創(chuàng)新互聯(lián)建站自2013年創(chuàng)立以來(lái)到現(xiàn)在10年的時(shí)間,我們擁有了豐富的建站經(jīng)驗(yàn)和運(yùn)維經(jīng)驗(yàn),來(lái)保證我們的工作的順利進(jìn)行。專(zhuān)注于網(wǎng)站建設(shè)就選創(chuàng)新互聯(lián)建站。
C:\>pip install ujson
Collecting ujson
Downloading https://files.pythonhosted.org/packages/16/c4/79f3409bc710559015464e5f49b9879430d8f87498ecdc335899732e5377/ujson-1.35.tar.gz (192kB)
100% |████████████████████████████████| 194kB 64kB/s
Building wheels for collected packages: ujson
Running setup.py bdist_wheel for ujson ... error
Complete output from command c:\programdata\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\niko\\AppData\\Local\\Temp\\pip-install-6naov7i3\\ujson\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\niko\AppData\Local\Temp\pip-wheel-v4jxz935 --python-tag cp36:
running bdist_wheel
running build
running build_ext
building 'ujson' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
Failed building wheel for ujson
Running setup.py clean for ujson
Failed to build ujson
Installing collected packages: ujson
Running setup.py install for ujson ... error
Complete output from command c:\programdata\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\niko\\AppData\\Local\\Temp\\pip-install-6naov7i3\\ujson\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\niko\AppData\Local\Temp\pip-record-dnr78gng\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'ujson' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
Command "c:\programdata\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\niko\\AppData\\Local\\Temp\\pip-install-6naov7i3\\ujson\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\niko\AppData\Local\Temp\pip-record-dnr78gng\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\niko\AppData\Local\Temp\pip-install-6naov7i3\ujson\
Python 2.7需要Microsoft Visual C++ 9.0的庫(kù)
Python 3.6需要Microsoft Visual C++ 14.0的庫(kù)
下載地址:https://www.lfd.uci.edu/~gohlke/pythonlibs/
在這里可以搜索你想要的庫(kù)!!!
使用 pip install xxx.whl 安裝即可。
下載微軟的C++編譯工具,CSDN上下載竟然花錢(qián),氣死我了...我特么還是學(xué)生呢...在這里下載吧,免費(fèi)的:http://down.51cto.com/data/2452424
下載完成使用管理員權(quán)限打開(kāi),安裝Windows10SDK和.NET框架即可!!!