Flatlib - bdist_wheel error - python

I am trying to install python flatlib, but i am getting an error:
Running setup.py bdist_wheel for pyswisseph ... error.
Failed building wheel for pyswisseph
Collecting pyswissep
Could not find a version that satisfies the requirement pyswissep (from versions: )
No matching distribution found for pyswissep
I have installed the latest Visual Studio C++ Build Tools.
I have run:
pip install -U setuptools
pip install - wheel
pip install update
easy_install -U pip
python -m pip install --upgrade pip
I'm using Python 3.7 and Pip 18.0
The usual ideas i can find don't have any effect!
Can anyone help?
Cheers, Will

Related

'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

Why can't I install Cassandra-driver

I am studying Cassandra by its document.
But when I use "pip install cassandra-driver" to install cassandra-driver ,failed like this:
weikairen2#weikairen2-virtual-machine:~$ pip install cassandra-driver
Collecting cassandra-driver
Using cached cassandra-driver-3.7.0.tar.gz
Requirement already satisfied (use --upgrade to upgrade): six>=1.6 in ./.local/lib/python2.7/site-packages (from cassandra-driver)
Requirement already satisfied (use --upgrade to upgrade): futures in ./.local/lib/python2.7/site-packages (from cassandra-driver)
Building wheels for collected packages: cassandra-driver
Running setup.py bdist_wheel for cassandra-driver ...
^Z
[1]+ 已停止 pip install cassandra-driver
weikairen2#weikairen2-virtual-machine:~$ ls
cassandra jdk 公共的 图片 音乐
cassandra-driver-3.7.0 pycharm 模板 文档 桌面
examples.desktop PycharmProjects 视频 下载
weikairen2#weikairen2-virtual-machine:~$ cd cassandra-driver-3.7.0
weikairen2#weikairen2-virtual-machine:~/cassandra-driver-3.7.0$ ls
cassandra ez_setup.py MANIFEST.in README.rst setup.py
cassandra_driver.egg-info LICENSE PKG-INFO setup.cfg
weikairen2#weikairen2-virtual-machine:~/cassandra-driver-3.7.0$ python setup.py install
^Z
[2]+ 已停止 python setup.py install
weikairen2#weikairen2-virtual-machine:~/cassandra-driver-3.7.0$ python setup.py build
as you can see,there is no response
and I have to stop it by ctrl+z
I also tried manul install
no response again
So where is the error? How can I fix it?
I figure out
"sudo pip install cassandra-driver"
it takes a little long time
I was just too impatient
It takes a long time, ~10mins in some environments. You can use
$ # installing from source
$ CASS_DRIVER_BUILD_CONCURRENCY=8 python setup.py install
$ # installing from pip
$ CASS_DRIVER_BUILD_CONCURRENCY=8 pip install cassandra-driver
to speed it up.
Source: https://docs.datastax.com/en/developer/python-driver/3.25/installation/

Python - Where is the pip executable after install?

Since I am on a server and do not have admin privilege, I need to install my own version of python and pip locally. After installed python, I used the code python get-pip.py --user which is on the official site. I get the following return and seems pip is successfully installed. But I do not know where is the pip executable so that I cannot add it to the system environment. So where is it installed?
Collecting pip
Using cached pip-8.1.2-py2.py3-none-any.whl
Collecting setuptools
Using cached setuptools-27.2.0-py2.py3-none-any.whl
Collecting wheel
Using cached wheel-0.29.0-py2.py3-none-any.whl
Installing collected packages: pip, setuptools, wheel
Successfully installed pip setuptools wheel
On Unix, pip install --user ... drops scripts into ~/.local/bin
pip sould be somewhere around ~/.local

Python equivalent of node.js's npm link to use local development versions of requirements?

In Node.js, I'm used to using npm link to get a project to use a custom version of a dependency. From the Node documentation:
First, npm link in a package folder will create a globally-installed symbolic link from prefix/package-name to the current folder.
Next, in some other location, npm link package-name will create a symlink from the local node_modules folder to the global symlink.
Is it kosher to do something similar by symlinking into site-packages?
The exact analogue is pip install -e . or python setup.py develop.
https://pip.pypa.io/en/latest/reference/pip_install.html#editable-installs
Perhaps, but what you probably want to do is use virtualenv. Virtualenv allows you to create a python environment isolated from any others:
$ virtualenv myenv
New python executable in myenv/bin/python
Installing setuptools............done.
Installing pip...............done.
$ source myenv/bin/activate
You can then install specific versions of python packages as you please, say version 0.1.0 of a random toolz package I just found, when the lastest version is 0.2.1:
(myenv)$ pip install toolz==0.1.0
Downloading/unpacking toolz==0.1.0
Downloading toolz-0.1.tar.gz
Running setup.py egg_info for package toolz
Downloading/unpacking itertoolz>=0.5 (from toolz==0.1.0)
Downloading itertoolz-0.5.tar.gz
Running setup.py egg_info for package itertoolz
Downloading/unpacking functoolz>=0.4 (from toolz==0.1.0)
Downloading functoolz-0.4.tar.gz
Running setup.py egg_info for package functoolz
Installing collected packages: toolz, itertoolz, functoolz
Running setup.py install for toolz
Running setup.py install for itertoolz
Running setup.py install for functoolz
Successfully installed toolz itertoolz functoolz
Cleaning up...
As you can see it also installs dependencies. You can also generate a requirements file:
(myenv)$ pip freeze
functoolz==0.4
itertoolz==0.5
toolz==0.1
wsgiref==0.1.2
Which you can then use to duplicate those same dependencies in another virtualenv
(myenv)$ pip freeze > reqs.txt
(myenv)$ deactivate
$ source env2/bin/activate
(env2)$ pip freeze
wsgiref==0.1.2
(env2)$ pip install -r reqs.txt
Downloading/unpacking functoolz==0.4 (from -r reqs.txt (line 1))
Downloading functoolz-0.4.tar.gz
Running setup.py egg_info for package functoolz
Downloading/unpacking itertoolz==0.5 (from -r reqs.txt (line 2))
Downloading itertoolz-0.5.tar.gz
Running setup.py egg_info for package itertoolz
Downloading/unpacking toolz==0.1 (from -r reqs.txt (line 3))
Downloading toolz-0.1.tar.gz
Running setup.py egg_info for package toolz
Requirement already satisfied (use --upgrade to upgrade): wsgiref==0.1.2 in /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6 (from -r reqs.txt (line 4))
Installing collected packages: functoolz, itertoolz, toolz
Running setup.py install for functoolz
Running setup.py install for itertoolz
Running setup.py install for toolz
Successfully installed functoolz itertoolz toolz
Cleaning up...

Categories