gotthardp / python-mercuryapi

Python wrapper for the ThingMagic Mercury API
MIT License
122 stars 63 forks source link

error: subprocess-exited-with-error #137

Closed DoongLi closed 1 year ago

DoongLi commented 1 year ago

when I use this “pip install python-mercuryapi” install,some errors happen below,my linux version is ubuntu20.04

pip install python-mercuryapi Collecting python-mercuryapi Using cached python-mercuryapi-0.5.3.tar.gz (21 kB) Preparing metadata (setup.py) ... done Building wheels for collected packages: python-mercuryapi Building wheel for python-mercuryapi (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [31 lines of output] running bdist_wheel running build curl https://www.jadaktech.com/wp-content/uploads/2019/10/mercuryapi-1.31.1.36-2.zip -o mercuryapi-1.31.1.36-2.zip % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed

    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
    0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
    0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
    0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0
  100  7278    0  7278    0     0   2348      0 --:--:--  0:00:03 --:--:--  2348
  100 72361    0 72361    0     0  22694      0 --:--:--  0:00:03 --:--:-- 22690
  unzip mercuryapi-1.31.1.36-2.zip
  Archive:  mercuryapi-1.31.1.36-2.zip
    End-of-central-directory signature not found.  Either this file is not
    a zipfile, or it constitutes one disk of a multi-part archive.  In the
    latter case the central directory and zipfile comment will be found on
    the last disk(s) of this archive.
  unzip:  cannot find zipfile directory in one of mercuryapi-1.31.1.36-2.zip or
          mercuryapi-1.31.1.36-2.zip.zip, and cannot find mercuryapi-1.31.1.36-2.zip.ZIP, period.
  make: *** [Makefile:23: mercuryapi-1.31.1.36/.done] Error 9
  running build_ext
  building 'mercury' extension
  creating build
  creating build/temp.linux-x86_64-cpython-39
  gcc -pthread -B /home/doongli/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/doongli/anaconda3/include -I/home/doongli/anaconda3/include -fPIC -O2 -isystem /home/doongli/anaconda3/include -fPIC -Ibuild/mercuryapi/include -I/home/doongli/anaconda3/include/python3.9 -c mercury.c -o build/temp.linux-x86_64-cpython-39/mercury.o
  mercury.c:23:10: fatal error: tm_reader.h: No such file or directory
     23 | #include <tm_reader.h>
        |          ^~~~~~~~~~~~~
  compilation terminated.
  error: command '/usr/bin/gcc' failed with exit code 1
  [end of output]

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

× Running setup.py install for python-mercuryapi did not run successfully. │ exit code: 1 ╰─> [23 lines of output] running install /home/doongli/anaconda3/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build unzip mercuryapi-1.31.1.36-2.zip Archive: mercuryapi-1.31.1.36-2.zip End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of mercuryapi-1.31.1.36-2.zip or mercuryapi-1.31.1.36-2.zip.zip, and cannot find mercuryapi-1.31.1.36-2.zip.ZIP, period. make: *** [Makefile:23: mercuryapi-1.31.1.36/.done] Error 9 running build_ext building 'mercury' extension creating build creating build/temp.linux-x86_64-cpython-39 gcc -pthread -B /home/doongli/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/doongli/anaconda3/include -I/home/doongli/anaconda3/include -fPIC -O2 -isystem /home/doongli/anaconda3/include -fPIC -Ibuild/mercuryapi/include -I/home/doongli/anaconda3/include/python3.9 -c mercury.c -o build/temp.linux-x86_64-cpython-39/mercury.o mercury.c:23:10: fatal error: tm_reader.h: No such file or directory 23 | #include | ^~~~~ compilation terminated. error: command '/usr/bin/gcc' failed with exit code 1 [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. ╰─> python-mercuryapi

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

pytremb commented 1 year ago

The solution is: https://github.com/gotthardp/python-mercuryapi/issues/86

DoongLi commented 1 year ago

@pytremb ,Hi,I downloaded Mercuryapi-Ahab-1.35.2.72-1.zip, but I don’t know how to modify the Makefile file,can you share the Makefile file you modified?

pytremb commented 1 year ago

Nǐ hǎo Dong Li. Here's the modified Makefile. Makefile.zip

DoongLi commented 1 year ago

@pytremb LOL, thanks very much, have a good day!