简体   繁体   中英

Cant install Aruco library in pycharm

i uninstal cv2 and download other version of cv2, and after aruco library delited too ind i cudnt install it back.

I used: pip intsall aruco

and tryed to install aruco library via Project interpretiter, but got that message:

Collecting aruco Using cached aruco-3.1.2.0.tar.gz (654 kB) Requirement already satisfied: numpy in c:\users\mastera\appdata\local\programs\python\python37\lib\site-packages (from aruco) (1.18.0) Requirement already satisfied: opencv-contrib-python in c:\users\mastera\appdata\local\programs\python\python37\lib\site-packages (from aruco) (4.2.0.34) Using legacy setup.py install for aruco, since package 'wheel' is not installed. Installing collected packages: aruco Running setup.py install for aruco: started Running setup.py install for aruco: finished with status 'error'

ERROR: Command errored out with exit status 1:
 command: 'C:\Users\mastera\AppData\Local\Programs\Python\Python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\mastera\\AppData\\Local\\Temp\\pycharm-packaging\\aruco\\setup.py'"'"'; __file__='"'"'C:\\Users\\mastera\\AppData\\Local\\Temp\\pycharm-packaging\\aruco\\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\mastera\AppData\Local\Temp\pip-record-f90ak5hd\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\mastera\AppData\Local\Programs\Python\Python37\Include\aruco'
     cwd: C:\Users\mastera\AppData\Local\Temp\pycharm-packaging\aruco\
Complete output (105 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
copying aruco.py -> build\lib.win-amd64-3.7
warning: build_py: byte-compiling is disabled, skipping.

running build_ext
building '_aruco' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\src
creating build\temp.win-amd64-3.7\Release\src\aruco
creating build\temp.win-amd64-3.7\Release\src\aruco\fractallabelers
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I/usr/local/include/opencv4/ -I/usr/local/include/opencv2 -I/usr/include/eigen3/ -Isrc/ -IC:\Users\mastera\AppData\Local\Programs\Python\Python37\include -IC:\Users\mastera\AppData\Local\Programs\Python\Python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.26.28801\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /EHsc /Tparuco_wrap.cxx /Fobuild\temp.win-amd64-3.7\Release\aruco_wrap.obj -std=c++11 -Wall -O3 -g0 -DNDEBUG -fopenmp
cl: ????????? ?????? warning D9002: ??????? ???????????? ????????? "-std=c++11"
cl: ????????? ?????? warning D9002: ??????? ???????????? ????????? "-O3"
cl: ????????? ?????? warning D9002: ??????? ???????????? ????????? "-g0"
cl: ????????? ?????? warning D9002: ??????? ???????????? ????????? "-fopenmp"
aruco_wrap.cxx
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\corecrt_io.h(49): warning C4820: _finddata32i64_t: "4"-???????? ???? ????????? ????? ??????-???? "_finddata32i64_t::name"
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\corecrt_io.h(54): warning C4820: _finddata64i32_t: "4"-???????? ???? ????????? ????? ??????-???? "_finddata64i32_t::attrib"
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\corecrt_io.h(64): warning C4820: __finddata64_t: "4"-???????? ???? ????????? ????? ??????-???? "__finddata64_t::attrib"
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\corecrt_io.h(69): warning C4820: __finddata64_t: "4"-???????? ???? ????????? ????? ??????-???? "__finddata64_t::name"
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\time.h(36): warning C4820: _timespec64: "4"-???????? ???? ????????? ????? ??????-???? "_timespec64::tv_nsec"
C:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt\time.h(43): warning C4820: timespec: "4"-???????? ???? ????????? ????? ??????-???? "timespec::tv_nsec"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\object.h(381): warning C4820: _typeobject: "4"-???????? ???? ????????? ????? ??????-???? "_typeobject::tp_flags"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\object.h(425): warning C4820: _typeobject: "4"-???????? ???? ????????? ????? ??????-???? "_typeobject::tp_version_tag"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\object.h(440): warning C4820: <unnamed-tag>: "4"-???????? ???? ????????? ????? ??????-???? "<unnamed-tag>::slot"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\object.h(448): warning C4820: <unnamed-tag>: "4"-???????? ???? ????????? ????? ??????-???? "<unnamed-tag>::flags"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\bytearrayobject.h(30): warning C4820: <unnamed-tag>: "4"-???????? ???? ????????? ????? ??????-???? "<unnamed-tag>::ob_exports"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\bytesobject.h(41): warning C4820: <unnamed-tag>: "7"-???????? ???? ????????? ????? ??????-???? "<unnamed-tag>::ob_sval"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\bytesobject.h(165): warning C4820: <unnamed-tag>: "4"-???????? ???? ????????? ????? ??????-???? "<unnamed-tag>::small_buffer"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\unicodeobject.h(330): warning C4820: <unnamed-tag>: "4"-???????? ???? ????????? ????? ??????-???? "<unnamed-tag>::state"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\unicodeobject.h(905): warning C4820: <unnamed-tag>: "2"-???????? ???? ????????? ????? ??????-???? "<unnamed-tag>::readonly"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\longintrepr.h(88): warning C4820: _longobject: "4"-???????? ???? ????????? ????? ??????-???? "_longobject::ob_digit"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\memoryobject.h(45): warning C4820: <unnamed-tag>: "4"-???????? ???? ????????? ????? ??????-???? "<unnamed-tag>::flags"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\memoryobject.h(62): warning C4820: <unnamed-tag>: "4"-???????? ???? ????????? ????? ??????-???? "<unnamed-tag>::flags"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\methodobject.h(61): warning C4820: PyMethodDef: "4"-???????? ???? ????????? ????? ??????-???? "PyMethodDef::ml_flags"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\moduleobject.h(62): warning C4820: PyModuleDef_Slot: "4"-???????? ???? ????????? ????? ??????-???? "PyModuleDef_Slot::slot"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\pystate.h(48): warning C4820: <unnamed-tag>: "4"-???????? ???? ????????? ????? ??????-???? "<unnamed-tag>::utf8_mode"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\pystate.h(51): warning C4820: <unnamed-tag>: "4"-???????? ???? ????????? ????? ??????-???? "<unnamed-tag>::argc"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\pystate.h(55): warning C4820: <unnamed-tag>: "4"-???????? ???? ????????? ????? ??????-???? "<unnamed-tag>::nxoption"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\pystate.h(58): warning C4820: <unnamed-tag>: "4"-???????? ???? ????????? ????? ??????-???? "<unnamed-tag>::nwarnoption"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\pystate.h(68): warning C4820: <unnamed-tag>: "4"-???????? ???? ????????? ????? ??????-???? "<unnamed-tag>::nmodule_search_path"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\pystate.h(77): warning C4820: <unnamed-tag>: "4"-???????? ???? ????????? ????? ??????-???? "<unnamed-tag>::_disable_importlib"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\pystate.h(98): warning C4820: <unnamed-tag>: "4"-???????? ???? ????????? ????? ??????-???? "<unnamed-tag>::install_signal_handlers"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\pystate.h(225): warning C4820: _ts: "2"-???????? ???? ????????? ????? ??????-???? "_ts::recursion_critical"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\pystate.h(233): warning C4820: _ts: "4"-???????? ???? ????????? ????? ??????-???? "_ts::use_tracing"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\pystate.h(256): warning C4820: _ts: "4"-???????? ???? ????????? ????? ??????-???? "_ts::gilstate_counter"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\pystate.h(290): warning C4820: _ts: "4"-???????? ???? ????????? ????? ??????-???? "_ts::coroutine_origin_tracking_depth"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\pystate.h(293): warning C4820: _ts: "4"-???????? ???? ????????? ????? ??????-???? "_ts::in_coroutine_wrapper"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\genobject.h(33): warning C4820: <unnamed-tag>: "7"-???????? ???? ????????? ????? ??????-???? "<unnamed-tag>::gi_running"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\genobject.h(53): warning C4820: <unnamed-tag>: "7"-???????? ???? ????????? ????? ??????-???? "<unnamed-tag>::cr_running"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\genobject.h(70): warning C4820: <unnamed-tag>: "7"-???????? ???? ????????? ????? ??????-???? "<unnamed-tag>::ag_running"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\descrobject.h(29): warning C4820: wrapperbase: "4"-???????? ???? ????????? ????? ??????-???? "wrapperbase::offset"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\descrobject.h(33): warning C4820: wrapperbase: "4"-???????? ???? ????????? ????? ??????-???? "wrapperbase::flags"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\structseq.h(20): warning C4820: PyStructSequence_Desc: "4"-???????? ???? ????????? ????? ??????-???? "PyStructSequence_Desc::n_in_sequence"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\pyerrors.h(18): warning C4820: <unnamed-tag>: "7"-???????? ???? ????????? ????? ??????-???? "<unnamed-tag>::suppress_context"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\pyerrors.h(22): warning C4820: <unnamed-tag>: "7"-???????? ???? ????????? ????? ??????-???? "<unnamed-tag>::suppress_context"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\pyerrors.h(32): warning C4820: <unnamed-tag>: "7"-???????? ???? ????????? ????? ??????-???? "<unnamed-tag>::suppress_context"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\pyerrors.h(39): warning C4820: <unnamed-tag>: "7"-???????? ???? ????????? ????? ??????-???? "<unnamed-tag>::suppress_context"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\pyerrors.h(48): warning C4820: <unnamed-tag>: "7"-???????? ???? ????????? ????? ??????-???? "<unnamed-tag>::suppress_context"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\pyerrors.h(53): warning C4820: <unnamed-tag>: "7"-???????? ???? ????????? ????? ??????-???? "<unnamed-tag>::suppress_context"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\pyerrors.h(65): warning C4820: <unnamed-tag>: "7"-???????? ???? ????????? ????? ??????-???? "<unnamed-tag>::suppress_context"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\modsupport.h(90): warning C4820: _PyArg_Parser: "4"-???????? ???? ????????? ????? ??????-???? "_PyArg_Parser::max"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\pylifecycle.h(15): warning C4820: <unnamed-tag>: "4"-???????? ???? ????????? ????? ??????-???? "<unnamed-tag>::user_err"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\import.h(140): warning C4820: _frozen: "4"-???????? ???? ????????? ????? ??????-???? "_frozen::size"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\fileutils.h(79): warning C4820: _Py_stat_struct: "4"-???????? ???? ????????? ????? ??????-???? "_Py_stat_struct::st_dev"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\fileutils.h(81): warning C4820: _Py_stat_struct: "2"-???????? ???? ????????? ????? ??????-???? "_Py_stat_struct::st_mode"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\fileutils.h(85): warning C4820: _Py_stat_struct: "4"-???????? ???? ????????? ????? ??????-???? "_Py_stat_struct::st_rdev"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\fileutils.h(88): warning C4820: _Py_stat_struct: "4"-???????? ???? ????????? ????? ??????-???? "_Py_stat_struct::st_atime_nsec"
C:\Users\mastera\AppData\Local\Programs\Python\Python37\include\fileutils.h(90): warning C4820: _Py_stat_struct: "4"-???????? ???? ????????? ????? ??????-???? "_Py_stat_struct::st_mtime_nsec"
aruco_wrap.cxx(369): warning C4820: swig_type_info: "4"-???????? ???? ????????? ????? ??????-???? "swig_type_info::owndata"
aruco_wrap.cxx(812): warning C4365: ????????: ?????????????? "Py_ssize_t" ? "size_t", ?????????????? ????? ?? ?????? ? ???
aruco_wrap.cxx(813): warning C4365: ????????: ?????????????? "Py_ssize_t" ? "size_t", ?????????????? ????? ?? ?????? ? ???
aruco_wrap.cxx(1140): warning C4820: swig_const_info: "4"-???????? ???? ????????? ????? ??????-???? "swig_const_info::type"
aruco_wrap.cxx(1142): warning C4820: swig_const_info: "4"-???????? ???? ????????? ????? ??????-???? "swig_const_info::lvalue"
aruco_wrap.cxx(1546): warning C4820: <unnamed-tag>: "4"-???????? ???? ????????? ????? ??????-???? "<unnamed-tag>::own"
aruco_wrap.cxx(2023): warning C4365: ????????: ?????????????? "Py_ssize_t" ? "size_t", ?????????????? ????? ?? ?????? ? ???
aruco_wrap.cxx(2210): warning C4365: ????????: ?????????????? "Py_ssize_t" ? "size_t", ?????????????? ????? ?? ?????? ? ???
aruco_wrap.cxx(2508): warning C4459: ?????????? "swig_this" ???????? ?????????? ??????????
aruco_wrap.cxx(2249): note:  ??. ?????????? "swig_this"
aruco_wrap.cxx(2583): warning C4459: ?????????? "swig_this" ???????? ?????????? ??????????
aruco_wrap.cxx(2249): note:  ??. ?????????? "swig_this"
aruco_wrap.cxx(3157): warning C4820: Swig::GCItem_Object: "4"-???????? ???? ????????? ????? ??????-???? "Swig::GCItem_Object::_own"
aruco_wrap.cxx(3254): warning C5039: "set_unexpected": ? ??????? extern "C" ? ?????????? -EHc ???? ???????? ????????? ??? ?????? ?? ???????, ??????? ????? ??????? ??????????. ???? ??? ??????? ??????? ??????????, ????? ?????????? ?????????????? ?????????.
aruco_wrap.cxx(3258): warning C5039: "set_unexpected": ? ??????? extern "C" ? ?????????? -EHc ???? ???????? ????????? ??? ?????? ?? ???????, ??????? ????? ??????? ??????????. ???? ??? ??????? ??????? ??????????, ????? ?????????? ?????????????? ?????????.
aruco_wrap.cxx(3392): warning C4820: Swig::Director: "7"-???????? ???? ????????? ????? ??????-???? "Swig::Director::swig_disown_flag"
aruco_wrap.cxx(3729): warning C4365: ????????: ?????????????? "ptrdiff_t" ? "size_t", ?????????????? ????? ?? ?????? ? ???
aruco_wrap.cxx(3979): warning C4127: ???????? ????????? ???????? ??????????
aruco_wrap.cxx(3979): note: ?????????? ???????????? ?????????? "if constexpr"
aruco_wrap.cxx(3985): warning C4127: ???????? ????????? ???????? ??????????
aruco_wrap.cxx(3985): note: ?????????? ???????????? ?????????? "if constexpr"
aruco_wrap.cxx(4012): warning C4127: ???????? ????????? ???????? ??????????
aruco_wrap.cxx(4012): note: ?????????? ???????????? ?????????? "if constexpr"
aruco_wrap.cxx(4121): warning C4127: ???????? ????????? ???????? ??????????
aruco_wrap.cxx(4121): note: ?????????? ???????????? ?????????? "if constexpr"
aruco_wrap.cxx(4127): warning C4127: ???????? ????????? ???????? ??????????
aruco_wrap.cxx(4127): note: ?????????? ???????????? ?????????? "if constexpr"
aruco_wrap.cxx(5372): warning C4127: ???????? ????????? ???????? ??????????
aruco_wrap.cxx(5372): note: ?????????? ???????????? ?????????? "if constexpr"
aruco_wrap.cxx(5481): fatal error C1083: ?? ??????? ??????? ???? ?????????: numpy/arrayobject.h: No such file or directory,
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.26.28801\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------

ERROR: Command errored out with exit status 1: 'C:\Users\mastera\AppData\Local\Programs\Python\Python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\mastera\AppData\Local\Temp\pycharm-packaging\aruco\setup.py'"'"'; file ='"'"'C:\Users\mastera\AppData\Local\Temp\pycharm-packaging\aruco\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\mastera\AppData\Local\Temp\pip-record-f90ak5hd\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\mastera\AppData\Local\Programs\Python\Python37\Include\aruco' Check the logs for full command output.

So it started working in mine after I did these:

1. First I went to https://pypi.org/project/aruco/#description I downloaded their zip file by clicking on 'Download Files'.

Then I went to this location encircled on my PC

Here, I extracted that aruco zip file I downloaded before. After extraction, you will find one new aruco folder inside that Roaming folder.

2. Another thing I did was within Pycharm I went to the Terminal inside Pycharm.

This area. My project name is 'untitled', might be different for you.

Here I executed:

pip install opencv-contrib-python

After installation, you can type python within the terminal and check if import cv2.aruco is working fine or not.

So to conclude, I dont know which one worked but I did both to be on the safer side and Voila!

PS: Kindly restart PyCharm after applying these changes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM