ERROR: No matching distribution found for psycopg2-binary==2.8.2 - docker

Please how should i install psycopg2-binary on my python image.
I tried pip install psycopg2-binary==2.8.2 but i got this error
ERROR: Could not find a version that satisfies the requirement psycopg2-binary==2.8.2 (from versions: 2.7.4, 2.7.5, 2.7.6, 2.7.6.1, 2.7.7, 2.8, 2.8.1, 2.8.2, 2.8.3, 2.8.4, 2.8.5, 2.8.6, 2.9, 2.9.1) ERROR: No matching distribution found for psycopg2-binary==2.8.2
My image is python3.9-alpine
What should i do please???

Given the amount of work that requires to be done, I suggest you use a different base image, e.g. python:3.9 or that you install the alpine package py3-psycopg2 (which is on v 2.8.6 at the time of writing).
Anyway I tried it on my machine and in the error it's also written Error: pg_config executable not found.
The pg_config is part of the postgres_dev package and needs to be installed before installing the psycopg2-binary package.
The psycopg2-binary will also need the gcc to be installed and some other libraries.
In other words, you have to execute the following commands:
apk add postgresql-dev gcc ...
pip install psycopg2-binary==2.8.2
I've abandoned the topic after I had to install a bunch of libraries.

Related

Need help for installing 'dlib' library

I've been trying to install dlib library for a while now and have tried almost all the solutions available on the web.
While installing this file I'm facing an error:
ERROR: dlib-19.7.0-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform.
Help me. Any suggestions?
You need to install Cmake first as it is required for Dlib, get installation files from here or use pip install cmake.
Then install Anaconda 3.
Then run, pip install dlib to install dlib making sure that you're using python2, instead of python3.

Error while installing OpenCV with Python3.9 on MacOS Mojave

Error message:
$ pip3 install opencv-contrib-python
ERROR: Could not find a version that satisfies the requirement opencv-contrib-python (from versions: none)
ERROR: No matching distribution found for opencv-contrib-python
Check the answer here.
You have to download source code from https://github.com/skvark/opencv-python, install compiler and necessary libraries and compile OpenCV yourself.

libprotobuf fatal google/protobuf/stubs/common.cc:78 This program was compiled against version 2.6.1

I'm installing Opencv on Ubuntu with VMWARE following this website.
I finished installing opencv and at Step #6, I put import cv2 and got this error:
[libprotobuf fatal /home/psh/opencv-master/3rdparty/protobuf/src/google
/protobuf/stubs/common.cc:78] This program was compiled against version
2.6.1 of the protocol Buffer runtime library, which is not compatible
with the installed version(3.1.0)...
How can I fix it?
I don't know exactly What is the reason. But I got the same problem like you. But instead of fix this error. I try new way to install OpenCV.
And I follow steps in this website: http://milq.github.io/install-opencv-ubuntu-debian/
Run these commands
sudo apt-get install libopencv-dev python-opencv
sudo apt-get autoremove libopencv-dev python-opencv
Download this script and Run
source install-opencv.sh
After about 1-hour installation, we can test by:
python
import cv2
cv2.__version__
If you want to install OpenCV in your virtualenv too, follow step #5 at this tutorial (your tutorial)

mariadb with rails: can't install libmysqlclient-dev

I have mariadb-10.1 installed on a stock 64bit Ubuntu 15:10.
I have libmysqlclient18 succesfully installed, but I get errors when trying to install libmysqlclient-dev.
steve#steve:~$ dpkg -s libmysqlclient18
Package: libmysqlclient18
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 10
Maintainer: MariaDB Developers <maria-developers#lists.launchpad.net>
Architecture: amd64
Source: mariadb-10.1
Version: 10.1.13+maria-1~wily
Replaces: libmysqlclient18 (<< 10.1.13+maria-1~wily)
Depends: libmariadbclient18 (= 10.1.13+maria-1~wily)
Description: Virtual package to satisfy external depends
This is an empty package that provides an updated "best" version of
libmysqlclient18 that does not conflict with the libmariadbclient18
package.
.
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
language in the world. The main goals of MariaDB are speed, robustness and
ease of use.
Homepage: http://mariadb.org/
steve#steve:~$ sudo apt-get install libmysqlclient-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies.
libmysqlclient-dev : Depends: libmysqlclient18 (= 5.6.28-0ubuntu0.15.10.1) but 10.1.13+maria-1~wily is to be installed
E: Unable to correct problems, you have held broken packages.
Can anyone suggest how to resolve this?
Thanks :-)
Steve
You have to install libmariadbclient-dev instead of libmysqlclient-dev when using MariaDB
sudo apt-get install libmariadbclient-dev
While installing libmariadbd-dev or libmariadbclient-dev package is the easiest way, in some OS's or package managers it is not available.
For example on a mac with homebrew this is not available, I found a workaround though.
To install gem mysql2 on a mac you need mariadb-connector-c in homebrew. This package conflicts with Mariadb symlinks so you need to do run the following in the terminal:
brew unlink mariadb
brew install mariadb-connector-c
Inside the rails project directory, execute:
bundle install (or gem install mysql2)
brew uninstall mariadb-connector-c
brew link mariadb

Homebrew cannot link libpng trying to install gdal

I'm trying to install gdal via homebrew so I can start working with topojson, but I keep getting this error and I'm not sure how to resolve it?
k-6177:Cellar k$ brew install gdal
==> Installing dependencies for gdal: libpng, giflib, libtiff, lzlib, proj, libgeotiff, geos, sqlite, freexl, libxml2, json-c, liblwgeom, libspatialite
Error: Cannot link libpng
Another version is already linked: /usr/local/Cellar/libpng/1.6.16
Looks like I just needed to change some permissions. I used the following command:
sudo chown -R $(whoami):admin /usr/local
I did brew unlink libpng (or any other "already linked" package).

Resources