I have installed all the dependencies and have all compilers installed etc. Then when I finally try to install OpenCv in Node.js with Node Package Manager, I get the following error:
/bin/sh: pkg-config: command not found
gyp: Call to 'pkg-config --cflags opencv' returned exit status 127. while trying to load bind
Has anyone had the same problem?
Related
I am running a meteor project requiring the node.js version 14.17.3 but running the command nvm install 14.17.3 throws an error. It's strange because I used the same command to download version 14.13 with no issues.
error:
Downloading and installing node v14.17.3...
Downloading https://nodejs.org/dist/v14.17.3/node-v14.17.3-darwin-arm64.tar.xz...
curl: (22) The requested URL returned error: 404
Binary download from https://nodejs.org/dist/v14.17.3/node-v14.17.3-darwin-arm64.tar.xz failed, trying source.
grep: /Users/confidential/.nvm/.cache/bin/node-v14.17.3-darwin-arm64/node-v14.17.3-darwin-arm64.tar.xz: No such file or directory
Provided file to checksum does not exist.
Binary download failed, trying source.
Clang v3.5+ detected! CC or CXX not specified, will use Clang as C/C++ compiler!
Local cache found: ${NVM_DIR}/.cache/src/node-v14.17.3/node-v14.17.3.tar.xz
Checksums match! Using existing downloaded archive ${NVM_DIR}/.cache/src/node-v14.17.3/node-v14.17.3.tar.xz
$>./configure --prefix=/Users/confidential/.nvm/versions/node/v14.17.3 <
Node.js configure: Found Python 3.10.7...
Please use python3.9 or python3.8 or python3.7 or python3.6 or python3.5 or python2.7.
nvm: install v14.17.3 failed!
Any help is appreciated, thank you in advance.
OS:ubuntu
I am able to install opencv-python from the command line. However,when I tried to install my self-built package with opencv-python dependencies, it failed to biuld:
Building wheels for collected packages: opencv-python
Building wheel for opencv-python (PEP 517): started
Building wheel for opencv-python (PEP 517): finished with status 'error'
ERROR: Complete output from command /usr/local/bin/python /usr/local/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmp7jntqv2r:
ERROR: Not searching for unused variables given on the command line.
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!
See also "/tmp/pip-install-utbicth7/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
Not searching for unused variables given on the command line.
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!
See also "/tmp/pip-install-utbicth7/opencv-python/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
-- Trying "Unix Makefiles" generator - failure
--------------------------------------------------------------------------------
********************************************************************************
scikit-build could not get a working generator for your system. Aborting build.
Building Linux wheels for Python 3.6 requires a compiler (e.g gcc).
It can be installed using debian package manager:
sudo apt-get install build-essential
To build compliant wheels, consider using the manylinux system described in PEP-513.
Get it with "dockcross/manylinux-x64" docker image:
https://github.com/dockcross/dockcross#readme
For more details, please refer to scikit-build documentation:
http://scikit-build.readthedocs.io/en/latest/generators.html#linux
********************************************************************************
----------------------------------------
ERROR: Failed building wheel for opencv-python
I suspect issue is with scikit-build. I checked I have ninja, make/gcc all available. I set manually CMAKE_MAKE_PROGRAM=/usr/bin/make.
But still failed with same error. I
You are missing dependencies. Please see this part of the error message you have provided above:
Building Linux wheels for Python 3.6 requires a compiler (e.g gcc).
It can be installed using debian package manager:
sudo apt-get install build-essential
Therefore, please use apt-get to install the build tools required to build your package.
Run pip3 install -U pip before install opencv-python.
Finally figured out, when I installed locally I had a requirements with version 4.1.x and no issues. When I install with the dependencies, it fetches the latest version 4.4 and the issue is that 1) pip version is 19.1 and2) since 4.3 opencv, the wheels has been replaced.
I tried to install spaCy on windows 10. I have python 3.7.0, also I install Microsoft Visual C++ Build Tools 14.0.
When I ran the following command:
pip install -U spacy
I got the following error:
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\link.exe' failed with
exit status 1158
Any idea is there something I missing?
Thank you all in advance!
Either follow theses steps Python, installing clarifai --> VS14.0 link.exe failed with exit status 1158
or install miniconda and then run conda install -c conda-forge spacy
I try running pip install tesserocr and I get the following error...
error: 'cinttypes' file not found
#include // PRId32, ...
^~~~~~~~~~~
1 error generated.
error: command 'gcc' failed with exit status 1
Failed building wheel for tesserocr
I've searched the entire web. I even tried compiling the source code and then running pip install . but this gave me the exact same error. How can I fix this?
there are various questions like this topic.
tesserocr is compiled during installation so you have to install also the development packages needed.
Which these are depends on your OS distribution
I have OS X Sierra and I'm trying to install psycopg2 version 2.6.2 within a virtual environment using virtualenv and Python 3.4. On the step "Running setup.py install for psycopg2" I get this error message:
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/usr/bin/clang' failed with exit status 1
I found that installing psycopg2 version 2.7.3.1 fixed the problem. So this bug must have been fixed in version 2.7 and above:
http://initd.org/psycopg/docs/news.html