Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encountered error while trying to install package. jsonobject #33

Open
jaradc opened this issue Jun 6, 2022 · 2 comments
Open

Encountered error while trying to install package. jsonobject #33

jaradc opened this issue Jun 6, 2022 · 2 comments

Comments

@jaradc
Copy link

jaradc commented Jun 6, 2022

Windows 10, using pip to install, I see this:

Microsoft Windows [Version 10.0.19043.1706]
(c) Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>pip install taxjar
Collecting taxjar
  Using cached taxjar-2.0.0-py3-none-any.whl
Requirement already satisfied: requests>=2.13.0 in c:\users\jarad\appdata\roaming\python\python37\site-packages (from taxjar) (2.25.1)
Collecting jsonobject>=0.9.10
  Using cached jsonobject-2.0.0.tar.gz (402 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: six in c:\python37\lib\site-packages (from jsonobject>=0.9.10->taxjar) (1.14.0)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\jarad\appdata\roaming\python\python37\site-packages (from requests>=2.13.0->taxjar) (1.25.11)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\jarad\appdata\roaming\python\python37\site-packages (from requests>=2.13.0->taxjar) (2020.12.5)
Requirement already satisfied: idna<3,>=2.5 in c:\users\jarad\appdata\roaming\python\python37\site-packages (from requests>=2.13.0->taxjar) (2.10)
Requirement already satisfied: chardet<5,>=3.0.2 in c:\users\jarad\appdata\roaming\python\python37\site-packages (from requests>=2.13.0->taxjar) (4.0.0)
Building wheels for collected packages: jsonobject
  Building wheel for jsonobject (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [23 lines of output]
      Warning: 'classifiers' should be a list, got type 'tuple'
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-3.7
      creating build\lib.win-amd64-3.7\jsonobject
      copying jsonobject\exceptions.py -> build\lib.win-amd64-3.7\jsonobject
      copying jsonobject\__init__.py -> build\lib.win-amd64-3.7\jsonobject
      running build_ext
      building 'jsonobject.api' extension
      creating build\temp.win-amd64-3.7
      creating build\temp.win-amd64-3.7\Release
      creating build\temp.win-amd64-3.7\Release\jsonobject
      C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\python37\include -Ic:\python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" /Tcjsonobject/api.c /Fobuild\temp.win-amd64-3.7\Release\jsonobject/api.obj
      api.c
      C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\python37\libs /LIBPATH:c:\python37\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64" /EXPORT:PyInit_api build\temp.win-amd64-3.7\Release\jsonobject/api.obj /OUT:build\lib.win-amd64-3.7\jsonobject\api.cp37-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.7\Release\jsonobject\api.cp37-win_amd64.lib
      api.obj : warning LNK4197: export 'PyInit_api' specified multiple times; using first specification
         Creating library build\temp.win-amd64-3.7\Release\jsonobject\api.cp37-win_amd64.lib and object build\temp.win-amd64-3.7\Release\jsonobject\api.cp37-win_amd64.exp
      Generating code
      Finished generating code
      LINK : fatal error LNK1158: cannot run 'rc.exe'
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\link.exe' failed with exit status 1158
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for jsonobject
  Running setup.py clean for jsonobject
Failed to build jsonobject
Installing collected packages: jsonobject, taxjar
  Running setup.py install for jsonobject ... error
  error: subprocess-exited-with-error

  × Running setup.py install for jsonobject did not run successfully.
  │ exit code: 1
  ╰─> [23 lines of output]
      Warning: 'classifiers' should be a list, got type 'tuple'
      running install
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-3.7
      creating build\lib.win-amd64-3.7\jsonobject
      copying jsonobject\exceptions.py -> build\lib.win-amd64-3.7\jsonobject
      copying jsonobject\__init__.py -> build\lib.win-amd64-3.7\jsonobject
      running build_ext
      building 'jsonobject.api' extension
      creating build\temp.win-amd64-3.7
      creating build\temp.win-amd64-3.7\Release
      creating build\temp.win-amd64-3.7\Release\jsonobject
      C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\python37\include -Ic:\python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt" /Tcjsonobject/api.c /Fobuild\temp.win-amd64-3.7\Release\jsonobject/api.obj
      api.c
      C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:c:\python37\libs /LIBPATH:c:\python37\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64" /EXPORT:PyInit_api build\temp.win-amd64-3.7\Release\jsonobject/api.obj /OUT:build\lib.win-amd64-3.7\jsonobject\api.cp37-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.7\Release\jsonobject\api.cp37-win_amd64.lib
      api.obj : warning LNK4197: export 'PyInit_api' specified multiple times; using first specification
         Creating library build\temp.win-amd64-3.7\Release\jsonobject\api.cp37-win_amd64.lib and object build\temp.win-amd64-3.7\Release\jsonobject\api.cp37-win_amd64.exp
      Generating code
      Finished generating code
      LINK : fatal error LNK1158: cannot run 'rc.exe'
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\link.exe' failed with exit status 1158
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> jsonobject

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
@jaradc
Copy link
Author

jaradc commented Jun 6, 2022

Looks like I had to follow this post:

https://www.tutorialexample.com/fix-python-pip-install-link-fatal-error-lnk1158-cannot-run-rc-exe-error-python-tutorial/

Copy rc.exe and rcdll.dll to:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin

Installed after that.

@uzairarkane
Copy link

I'm also having this issue on MacOS 12.4. And I'm using python 3.8. Any suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants