Opencv not installing for python in terminal - python

I am trying to install opencv in the terminal but every time I try installing it an error comes up saying ERROR: Failed building wheel for numpy Failed to build numpy ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly
I tried installing with pip install opencv-python and pip install opencv-contrib-python

Opencv apparently doesn't work well with M1 chip macs, so I advise using conda instead of venv or pip, things that showed errors with pip doesn't show in conda. For me atleast :)

Related

Unable to install "PyAudio" on the MacOS (MacBook Air, Intel)?

I have tried every possible way given on the internet but could not fix this issue ERROR: Could not build wheels for pyaudio, which is required to install pyproject.toml-based projects
Even I tried brew install portaudio and pip3 install pyaudio also.
I tried pip install --global-option='build_ext' --global-option='-I/usr/local/include' --global-option='-L/usr/local/lib' pyaudio also but could not fix my issue
image of my terminal

unable to download OpenCv on mac with pycharm

Don't know what the issue is. I am unable to download openCv on my mac with pycharm.
I use Python Version 3.8.1.
I have tried to:
pip3 install --upgrade pip setuptools wheel
pip3 install --upgrade pip
I use command:
pip3 install opencv-python
Still does not work. I get the message:
ERROR: Failed building wheel for opencv-python
Failed to build opencv-python
What is the issue? Hope you can help. Has been taking me several of hours now and each time to "build" takes like 1 hour..
Do you have a MacBook with M1 processor?
The problem is that pip does not always install the arm64 version and instead tries to use rosetta to run amd64 versions which breaks. So it “works” it is just finicky and error prone.
Try to install following the steps on this blog: https://blog.roboflow.com/m1-opencv/

Trouble installing hdbscan package for python : "no module named 'hdbscan'" error

I want to run an algorithm written in Python on my Ubuntu virtual machine. It needs to import the hdbscan module. I thus want to install it on my virtual machine.
Following the documentationfrom Pypi.org about this library, I simply ran :
pip install hdbscan
After a few minutes, it returned :
Succesfully built hdbscan
Installing collected packages: hdbscan
Succesfully installed hdbscan-0.8.27
However, if I run my algorithm, it still says that there's "No module named 'hdbscan'".
I tried pip uninstall hdbscan but it then returns :
WARNING : Skipping hdbscan as it is not installed.
I have tried several commands to fix this issue, like for example
sudo apt --reinstall install hdbscan
or
pip install --upgrade git+https://github.com/scikit-learn-contrib/hdbscan.git#egg=hdbscan
All I get as a result is "successfully installed" or "requirement already satisfied" but my algorithm still can't use it, "is not installed" or "unable to locate package hdbscan" alternatively as I try one command or another.
I don't know what is the cause of the problem nor how to fix it. Can anyone help me please ?
try this in your terminal
conda install -c conda-forge hdbscan
I had the same problem using Windows. I fixed it installing the various dependencies before and then hdbscan out of any environment.
I strictly recommend to run the terminal as administrator, otherwise some dependencies cannot be solved.
conda install cython
conda install numpy scipy
conda install scikit-learn
pip install hdbscan

ERROR: Could not build wheels for Kivy which use PEP 517 and cannot be installed directly

I've been trying to install kivy on windows10 machine and I did not get an expected output, instead, I got a series of weird error messages. First I ran the following commands:
python -m pip install --upgrade pip wheel setuptools
python -m pip install docutils pygments pypiwin32 kivy.deps.sdl2 kivy.deps.glew
python -m pip install kivy.deps.gstreamer
python -m pip install kivy.deps.angle
python -m pip install pygame
And as far as I know, everything went right.
After that, I ran this command: python -m pip install https://github.com/kivy/kivy/archive/master.zip
Command output helped me break down the process of executing it.
First I got an error message while "Getting requirements to build wheel".
error message:
I got this error while "Preparing wheel metadata" and "Building wheel for Kivy (PEP 517)" as well. I think that it is worth mentioning that every time I said that error occurred, it occurred twice, one after another.
After that, I got a huge error:
You can download the test file with an error message on this link: https://filesend.standardnotes.org/send/BPQTjNM3aiUyRXOtfA3A#ZGI2ZDUzMWU2MmYzNTlhNTVlODEw
Note: All the commands that I executed were executed in cmd ran by the administrator.
If anyone can explain to me what is going on I would highly appreciate it!
Going by related issues here - ERROR: Could not build wheels for pendulum which use PEP 517 and cannot be installed directly and pip failing to build wheels for scipy
The answers seem to suggest that downgrading pip version will likely solve the problem. But before that please try
pip install --upgrade pip setuptools wheel
Instead of
python -m pip install --upgrade pip wheel setuptools
and see if it solves. If not, downgrade your pip by doing
python -m pip install --force-reinstall pip==18.1
If none of these work then your only viable solution is to use Kivy within Anaconda. You can see more on installation from here.
If I am not mistaken, this error means that you are trying to run 64-bit application on a 32-bit system. Install python version which corresponds to your OS, and then try again.
Also, make sure you have the newest version of C++ Redistributable installed.

no version.py when install gizeh

I tried to use pip to install gizeh, but it failed whilst installing cairo. So I installed cairo separately, and downloaded the repo and used this command to install it:
python c:\gizeh-master\setup.py install
But I get a
no 'version.py'
Error. What should I do to install this module without any problems? Is it even compatible with Python 3.5?

Categories

Resources