Python Forum
error while installing any library using pip in windows
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
error while installing any library using pip in windows
#1
pip install jsonlib
Collecting jsonlib
Using cached jsonlib-1.6.1.tar.gz (43 kB)
Building wheels for collected packages: jsonlib
Building wheel for jsonlib (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\akash.kansal\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\AKASH~1.KAN\\AppData\\Local\\Temp\\pip-install-16u7jp2c\\jsonlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\AKASH~1.KAN\\AppData\\Local\\Temp\\pip-install-16u7jp2c\\jsonlib\\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\AKASH~1.KAN\AppData\Local\Temp\pip-wheel-rjafnvju'
cwd: C:\Users\AKASH~1.KAN\AppData\Local\Temp\pip-install-16u7jp2c\jsonlib\
Complete output (31 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
copying jsonlib.py -> build\lib.win-amd64-3.7
running build_ext
building '_jsonlib' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\akash.kansal\appdata\local\programs\python\python37\include -Ic:\users\akash.kansal\appdata\local\programs\python\python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tc_jsonlib.c /Fobuild\temp.win-amd64-3.7\Release\_jsonlib.obj
_jsonlib.c
_jsonlib.c(550): warning C4018: '<': signed/unsigned mismatch
_jsonlib.c(643): warning C4020: 'PyFloat_FromString': too many actual parameters
_jsonlib.c(1186): warning C4013: 'PyString_CheckExact' undefined; assuming extern returning int
_jsonlib.c(1188): warning C4013: 'PyString_Check' undefined; assuming extern returning int
_jsonlib.c(1208): warning C4013: 'PyObject_Unicode' undefined; assuming extern returning int
_jsonlib.c(1208): warning C4047: '=': 'PyObject *' differs in levels of indirection from 'int'
_jsonlib.c(1406): warning C4013: 'PyInt_CheckExact' undefined; assuming extern returning int
_jsonlib.c(1517): warning C4013: 'PyString_AS_STRING' undefined; assuming extern returning int
_jsonlib.c(1517): warning C4047: 'function': 'const char *' differs in levels of indirection from 'int'
_jsonlib.c(1517): warning C4024: 'ascii_constant': different types for formal and actual parameter 1
_jsonlib.c(1539): warning C4013: 'PyInt_Check' undefined; assuming extern returning int
_jsonlib.c(1931): warning C4047: '=': 'const char *' differs in levels of indirection from 'int'
_jsonlib.c(1970): warning C4047: 'function': 'const char *' differs in levels of indirection from 'int'
_jsonlib.c(1970): warning C4024: 'serializer_append_ascii': different types for formal and actual parameter 2
_jsonlib.c(2161): warning C4013: 'Py_InitModule3' undefined; assuming extern returning int
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\users\akash.kansal\appdata\local\programs\python\python37\libs /LIBPATH:c:\users\akash.kansal\appdata\local\programs\python\python37\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\um\x64" /EXPORT:PyInit__jsonlib build\temp.win-amd64-3.7\Release\_jsonlib.obj /OUT:build\lib.win-amd64-3.7\_jsonlib.cp37-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.7\Release\_jsonlib.cp37-win_amd64.lib
LINK : error LNK2001: unresolved external symbol PyInit__jsonlib
build\temp.win-amd64-3.7\Release\_jsonlib.cp37-win_amd64.lib : fatal error LNK1120: 1 unresolved externals
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\link.exe' failed with exit status 1120
----------------------------------------
ERROR: Failed building wheel for jsonlib
Running setup.py clean for jsonlib
Failed to build jsonlib
Installing collected packages: jsonlib
Running setup.py install for jsonlib ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\akash.kansal\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\AKASH~1.KAN\\AppData\\Local\\Temp\\pip-install-16u7jp2c\\jsonlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\AKASH~1.KAN\\AppData\\Local\\Temp\\pip-install-16u7jp2c\\jsonlib\\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\AKASH~1.KAN\AppData\Local\Temp\pip-record-ns_0zft2\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\akash.kansal\appdata\local\programs\python\python37\Include\jsonlib'
cwd: C:\Users\AKASH~1.KAN\AppData\Local\Temp\pip-install-16u7jp2c\jsonlib\
Complete output (31 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
copying jsonlib.py -> build\lib.win-amd64-3.7
running build_ext
building '_jsonlib' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\akash.kansal\appdata\local\programs\python\python37\include -Ic:\users\akash.kansal\appdata\local\programs\python\python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tc_jsonlib.c /Fobuild\temp.win-amd64-3.7\Release\_jsonlib.obj
_jsonlib.c
_jsonlib.c(550): warning C4018: '<': signed/unsigned mismatch
_jsonlib.c(643): warning C4020: 'PyFloat_FromString': too many actual parameters
_jsonlib.c(1186): warning C4013: 'PyString_CheckExact' undefined; assuming extern returning int
_jsonlib.c(1188): warning C4013: 'PyString_Check' undefined; assuming extern returning int
_jsonlib.c(1208): warning C4013: 'PyObject_Unicode' undefined; assuming extern returning int
_jsonlib.c(1208): warning C4047: '=': 'PyObject *' differs in levels of indirection from 'int'
_jsonlib.c(1406): warning C4013: 'PyInt_CheckExact' undefined; assuming extern returning int
_jsonlib.c(1517): warning C4013: 'PyString_AS_STRING' undefined; assuming extern returning int
_jsonlib.c(1517): warning C4047: 'function': 'const char *' differs in levels of indirection from 'int'
_jsonlib.c(1517): warning C4024: 'ascii_constant': different types for formal and actual parameter 1
_jsonlib.c(1539): warning C4013: 'PyInt_Check' undefined; assuming extern returning int
_jsonlib.c(1931): warning C4047: '=': 'const char *' differs in levels of indirection from 'int'
_jsonlib.c(1970): warning C4047: 'function': 'const char *' differs in levels of indirection from 'int'
_jsonlib.c(1970): warning C4024: 'serializer_append_ascii': different types for formal and actual parameter 2
_jsonlib.c(2161): warning C4013: 'Py_InitModule3' undefined; assuming extern returning int
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\users\akash.kansal\appdata\local\programs\python\python37\libs /LIBPATH:c:\users\akash.kansal\appdata\local\programs\python\python37\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\um\x64" /EXPORT:PyInit__jsonlib build\temp.win-amd64-3.7\Release\_jsonlib.obj /OUT:build\lib.win-amd64-3.7\_jsonlib.cp37-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.7\Release\_jsonlib.cp37-win_amd64.lib
LINK : error LNK2001: unresolved external symbol PyInit__jsonlib
build\temp.win-amd64-3.7\Release\_jsonlib.cp37-win_amd64.lib : fatal error LNK1120: 1 unresolved externals
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.16.27023\\bin\\HostX86\\x64\\link.exe' failed with exit status 1120
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\akash.kansal\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\AKASH~1.KAN\\AppData\\Local\\Temp\\pip-install-16u7jp2c\\jsonlib\\setup.py'"'"'; __file__='"'"'C:\\Users\\AKASH~1.KAN\\AppData\\Local\\Temp\\pip-install-16u7jp2c\\jsonlib\\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\AKASH~1.KAN\AppData\Local\Temp\pip-record-ns_0zft2\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\akash.kansal\appdata\local\programs\python\python37\Include\jsonlib' Check the logs for full command output.
Reply
#2
for python3 you are supposed to use jsonlib-python3:
use pip install jsonlib-python3

But I am not sure that package last updated in 2010 is a good choice
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  "SSL: CERTIFICATE_VERIFY_FAILED” error on Python 3.9.6 (Windows 10) rcmv 4 1,518 May-10-2022, 01:18 PM
Last Post: rcmv
  Installing Qt for Python. (On Windows 10) davediamond 22 1,743 Apr-18-2022, 06:50 AM
Last Post: ndc85430
  Pynput Library not Working with Windows jacknewport 1 908 Mar-26-2022, 07:09 PM
Last Post: snippsat
  Install any library via pip get an error cannot import name 'SCHEME_KEYS' from 'pip. Anldra12 2 5,034 Jan-04-2022, 01:05 PM
Last Post: Anldra12
  Error about parser library and tree builder Led_Zeppelin 8 4,878 Jun-11-2021, 08:53 PM
Last Post: snippsat
  Installing auto-sklearn on Windows 10 Led_Zeppelin 1 1,696 Apr-15-2021, 08:02 PM
Last Post: bowlofred
  Need help installing infoblox-client on Windows 10 dazmac10 1 1,847 Mar-07-2021, 10:57 PM
Last Post: snippsat
  installing python in windows 10 martynarthur2102 1 1,146 Aug-22-2020, 01:53 PM
Last Post: buran
  Pip prints huge error when installing p5 hayden2s 1 1,547 Aug-08-2020, 02:30 PM
Last Post: snippsat
  Installing Error - Python 2.7.8 saranana 2 1,672 Jun-04-2020, 02:25 AM
Last Post: pyzyx3qwerty

Forum Jump:

User Panel Messages

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