How to install ruptures with Python 3.11.1 on Windows 10 - python

I created a new Python environment with 3.11.1, and installed the numpy and scipy dependencies per documentation. But then when I try to pip install ruptures it gives this error:
Failed to build ruptures
ERROR: Could not build wheels for ruptures, which is required to install pyproject.toml-based projects
I also tried pip install --no-binary :all: ruptures
And get this error:
pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
Any ideas on how to resolve this issue? Thanks!

Related

Failed building wheel for pandas

I was trying to pip install pandas==1.2.5
And have the issue
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pandas
Failed to build pandas
ERROR: Could not build wheels for pandas, which is required to install pyproject.toml-based projects
1.Updated pip to the latest version: pip install --upgrade pip
2.Tried installing the dependencies for pandas: pip install numpy matplotlib
3.Tried installing pandas again: pip install pandas==1.2.5

cant install h5py on mac using pip

Cant install h5py on mac
ERROR: Failed building wheel for h5py
Failed to build h5py
ERROR: Could not build wheels for h5py, which is required to install pyproject.toml-based projects
have done
pip install --upgrade pip setuptools wheel
pip install versioned-hdf5
pip install h5py
nothing working.
Ultimately I'm trying to install tensorflow but that's not working so i tried this
python3 -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl
but now its giving me the cannot build wheels for h5py error.

'pip install regressors' - error is : " python setup.py egg_info did not run successfully. "

I can't install the regressors package with pip install regressors command in Windows 11.
The returned error is:
python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [32 lines of output]
I have upgraded below libraries/dependencies.
pip install --upgrade pip
pip install --upgrade setuptools
pip install ez_setup
Tried many suggestions from Web, none of them worked Any help would be
appreciated,
I fixed a similar error when installing a different package by downgrading my version of setup tools:
pip install --upgrade pip setuptools==57.5.0
pip install {package}
I got to this solution from this: https://github.com/Thibauth/python-pushover/issues/42
Clone this library into your project, remove use_2to3 argument from setup.py in regressors package you cloned then install it with pip using below command and after that you can use this package in your project:
pip install -e ./name_of_your_clone_instance

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

I was trying to install OpenCV4 in a docker on jetson nano. It has jetpack 4.4 s os. The docker was successfully created and Tensorflow is running but while installing OpenCV using pip it is showing CMake error.
root#5abf405fb92d:~# pip3 install opencv-python
Collecting opencv-python
Downloading opencv-python-4.4.0.42.tar.gz (88.9 MB)
|████████████████████████████████| 88.9 MB 2.5 kB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: numpy>=1.13.3 in /usr/local/lib/python3.6/dist-packages (from opencv-python) (1.18.4)
Building wheels for collected packages: opencv-python
Building wheel for opencv-python (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /usr/local/lib/python3.6/dist-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpqpzwrofy
cwd: /tmp/pip-install-93nxibky/opencv-python
Complete output (9 lines):
File "/tmp/pip-build-env-o_hualnr/overlay/lib/python3.6/site-packages/skbuild/setuptools_wrap.py", line 560, in setup
cmkr = cmaker.CMaker(cmake_executable)
File "/tmp/pip-build-env-o_hualnr/overlay/lib/python3.6/site-packages/skbuild/cmaker.py", line 95, in __init__
self.cmake_version = get_cmake_version(self.cmake_executable)
File "/tmp/pip-build-env-o_hualnr/overlay/lib/python3.6/site-packages/skbuild/cmaker.py", line 82, in get_cmake_version
"Problem with the CMake installation, aborting build. CMake executable is %s" % cmake_executable)
Traceback (most recent call last):
Problem with the CMake installation, aborting build. CMake executable is cmake
----------------------------------------
ERROR: Failed building wheel for opencv-python
Failed to build opencv-python
ERROR: Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly
I had the same problem and i did this,
pip install --upgrade pip setuptools wheel
then install opencv again,
pip install opencv-python
this worked for me
If after
pip install --upgrade pip setuptools wheel
you still have the same error,
You can try to specify the older version of OpenCV to install.
Ex.
pip3 install opencv-python==3.4.13.47
Yes .. Finally found a work around.
Follow this https://github.com/mdegans/nano_build_opencv and build from source and finally gets installed.
PS: It may take a bit long for building, for me it took 10 Hrs :P.
Happy Image-Processing..
I had a similar problem and what solved it for me was not to use python:3-alpine but python:3.8-slim. E.g.:
FROM python:3.8-slim
WORKDIR /usr/src/app
RUN apt update
RUN apt -y install build-essential libwrap0-dev libssl-dev libc-ares-dev uuid-dev xsltproc
RUN apt-get update -qq \
&& apt-get install --no-install-recommends --yes \
build-essential \
gcc \
python3-dev \
mosquitto \
mosquitto-clients
RUN pip3 install --upgrade pip setuptools wheel
RUN python3 -m pip install --no-cache-dir \
numpy scipy matplotlib scikit-build opencv-contrib-python-headless \
influxdb paho-mqtt configparser Pillow \
qrcode
worked finally for me.
please check your python specifications:
- opencv -> python[
version='
>=2.7,<2.8.0a0
>=3.5,<3.6.0a0
>=3.6,<3.7.0a0
>=3.7,<3.8.0a0']
I handled it by reinstalling python3 from scratch in my MacBook:
brew reinstall python#3.9
I also reinstalled numpy and matplotlib packages experimentally.
pip3 install numpy
pip3 install matplotlib
pip3 install opencv-contrib-python
The versions:
macOS Mojave 10.14.5
Python 3.9.7
OpenCV 4.5.3
OpenCV's version is 4.5.3 by this way:
import cv2
print(cv2.__version__)
But by "pip list", it shows "opencv-contrib-python 3.4.9.31".
if you are trying to install opencv in your raspberrypi 3B, Use following steps:
sudo raspi-config
advanced -- expand filesystem
reboot your pi
Open your raspi terminal and do following stuff:
use command: sudo apt-get update
use command: sudo apt-get upgrade
check your python version and upgarde it to latest one
install pip and upgrade pip
use command: mkdir project
use command: cd project
create virtual environment
activate virtual environment
install dependencies ,can get dependencies from https://singleboardbytes.com/647/install-opencv-raspberry-pi-4.htm
if error in installing libdhf5-dev
use command: sudo apt-get install python3-h5py and reinstall libdhf5-dev
use command: pip install scikit-build
use command: pip install cython
before installing opencv ,make sure you are in virtual environment or
activate environment
use command: pip install --no-cache-dir opencv-contrib-python==4.5.3.56
Remember to use mentioned version...
Thank You...
I came across similiar situation
I had error
Failed to build opencv-python ERROR: Could not build wheels for
opencv-python which use PEP 517 and cannot be installed directly
WARNING: You are using pip version 19.2.3, however version 22.0.4 is
available. You should consider upgrading via the 'python -m pip
install --upgrade pip' command.
I ran in command prompt with admin privileges following
python -m pip install --upgrade pip
Now "pip install opencv-python" works

Unable to install scipy on rhel 7.7 on Dockerfile

I'm unable to install scipy on rhel 7.7 ibm linuxone vm.
my Dockerfile consists of
FROM python:3
RUN pip install pystrich
RUN pip install numpy
RUN pip install pandas
RUN pip install scipy
RUN pip install scikit-learn
Error: The command '/bin/sh -c pip install scipy' returned a non-zero code: 1
but without scipy and sklearn application was successfully building. please help through this one.

Categories