libpython2.7.so.1.0()(64bit) not found by yum - python

So I'm trying to install Azure on CentOS with yum: link.
But it keeps telling me it needs libpython2.7.so.1.0:
[root#minnow02 Desktop]# yum install azure-cli
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirror.sfo12.us.leaseweb.net
* extras: mirror.sfo12.us.leaseweb.net
* updates: mirror.sfo12.us.leaseweb.net
Resolving Dependencies
--> Running transaction check
---> Package azure-cli.x86_64 0:2.0.28-1.el7 will be installed
--> Processing Dependency: libpython2.7.so.1.0()(64bit) for package: azure-cli-2.0.28-1.el7.x86_64
--> Finished Dependency Resolution
Error: Package: azure-cli-2.0.28-1.el7.x86_64 (azure-cli)
Requires: libpython2.7.so.1.0()(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
But I have python 2.7:
[root#minnow02 Desktop]# python -V
Python 2.7.5
[root#minnow02 Desktop]# find / -iname "pyth.so*"
/usr/lib/libpython2.7.so.1.0
/usr/lib/libpython2.7.so
/usr/lib/libpython2.7.so.1.0()(64bit)
/usr/local/python2.7/lib/libpython2.7.so.1.0
/usr/local/python2.7/lib/libpython2.7.so
/usr/local/python2.7/lib/libpython2.7.so.1.0()(64bit)
What's going on?

I have test it with Centos 6.8 and Centos 7.4, can't reproduce your error.
Please use this command to install Azure CLI:
# 1. Install a package with repository for your system:
# On CentOS, install package centos-release-scl available in CentOS repository:
$ sudo yum install centos-release-scl
# 2. Install the collection:
$ sudo yum install python27
# 3. Start using software collections:
$ scl enable python27 bash
# 4. Import the Microsoft repository key.
$ sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
# 5. Create local azure-cli repository information.
$ sudo sh -c 'echo -e "[azure-cli]\nname=Azure CLI\nbaseurl=https://packages.microsoft.com/yumrepos/azure-cli\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/azure-cli.repo'
# 6. Install with the yum install command.
$ sudo yum install azure-cli
Please try it.

Related

RPM installation Trino throws python dependency

I'm trying to install Trino using RPM on Red Hat Enterprise Linux distribution. I install the Trino dependencies using the following commands:
$ sudo yum update -y
$ sudo yum install -y java-11-openjdk.x86_64 python3
$ sudo alternatives --set python /usr/bin/python3
Then I try to install Trino from archive in single-node mode. This however gives a dependency error:
$ sudo rpm -i trino-server-rpm-368.rpm
error: Failed dependencies:
python >= 2.4 is needed by trino-server-rpm-0:368-1.noarch
This error doesn't make sense to me given that this dependency is actually satisfied when checking my python version:
$ python -V
Python 3.6.8
An answers has been provided by #hashhar on this Github Issue if you actually have the correct dependencies installed:
$ sudo rpm -i --nodeps trino-server-rpm-368.rpm

Centos: Not able to install pip

I am totally new to python so I have no clue what's happening here.
When I do
which pip
/usr/bin/which: no pip in (/usr/local/bin/python:/usr/bin/python2:/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)
and then to install pip, when I do
sudo yum install python-pip
I get this
Loaded plugins: fastestmirror, versionlock
Loading mirror speeds from cached hostfile
* base: centos.myfahim.com
* epel: kartolo.sby.datautama.net.id
* extras: centos.myfahim.com
* updates: centos.myfahim.com
Package python2-pip-8.1.2-5.el7.noarch already installed and latest version
Nothing to do
Can someone please help. It's very frustrating.
PS: Here are my python details
which python
/usr/local/bin/python
python --version
Python 2.6.6
The python2-pip RPM contains:
/usr/bin/pip
/usr/bin/pip2
/usr/bin/pip2.7
When there seems to be no pip in /usr/bin, check with:
rpm -qV python2-pip
for missing files and reinstall the RPM if necessary:
yum reinstall python2-pip
(Enabled epel repository is assumed.)
Probably there can be problem with environment variable PATH.
You can try again with searching:
whereis pip
sudo updatedb
locate pip
take also look on
env | grep -i PATH
Or try again installing pip (again)
#adding epel repository https://wiki.centos.org/AdditionalResources/Repositories
yum -y update #it will update your repo package references
yum -y install python-pip # -y parameter says yes

pip error while installing Python: "Ignoring ensurepip failure: pip 8.1.1 requires SSL/TLS"

I downloaded the Python 3.5 source code and ran the following:
$ tar -xf Python-3.5.2.tar.xz
$ ./configure --with-ensurepip=upgrade
$ make
$ sudo make altinstall
It proceeded well until make. When sudo make altinstall ran, it printed:
Ignoring ensurepip failure: pip 8.1.1 requires SSL/TLS
What went wrong?
You are most likely not compiling Python with SSL/TLS support - this is likely because you don't have the SSL development dependencies installed on your system.
Install the following dependency, and then re-configure and re-compile Python 3.5.
Ubuntu
apt-get install libssl-dev
In addition it is recommended to install the following.
apt-get install make build-essential libssl-dev zlib1g-dev libbz2-dev libsqlite3-dev
CentOS
yum install openssl-devel
In addition it is recommended to install the following.
yum install zlib-devel bzip2-devel sqlite sqlite-devel openssl-devel
Please note that besides that as of version OpenSSL 1.1.0 (included from Ubuntu 18.04 repositories, I am not sure for other Linux distributions) there are python vesions that may have compilation issues (see this question and my answer), in short:
Python <3.4.5 and Python <3.5.3 have not implemented this newest version of OpenSSL, most likely other major Python versions suffer the same issue. The fix is to download the minor version that implements the fix (or newer). Check the full changelogs to check which minor version that is (changelog for 3.4 and 3.5)
On Ubuntu 18.04 only this worked for me
sudo apt-get install libssl1.0
CentOS:
If you didn't have openssl-devel at the time of installing python, pip 8.1.1 won't install.
After installing openssl-devel, reinstall python.
This time it should install pip just file.
I tried to install Python 3.4.10 using asdf but got following error:
$ asdf install python 3.4.10
python-build 3.4.10 /home/br0ke/.asdf/installs/python/3.4.10
Downloading Python-3.4.10.tar.xz...
-> https://www.python.org/ftp/python/3.4.10/Python-3.4.10.tar.xz
Installing Python-3.4.10...
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?
Please consult to the Wiki page to fix the problem.
https://github.com/pyenv/pyenv/wiki/Common-build-problems
BUILD FAILED (Fedora 30 using python-build 1.2.15-2-g22c02022)
Inspect or clean up the working tree at /tmp/python-build.20191121110112.9959
Results logged to /tmp/python-build.20191121110112.9959.log
Last 10 log lines:
(cd /home/br0ke/.asdf/installs/python/3.4.10/share/man/man1; ln -s python3.4.1 python3.1)
if test "xupgrade" != "xno" ; then \
case upgrade in \
upgrade) ensurepip="--upgrade" ;; \
install|*) ensurepip="" ;; \
esac; \
./python -E -m ensurepip \
$ensurepip --root=/ ; \
fi
Ignoring ensurepip failure: pip 9.0.1 requires SSL/TLS
It may mean that I have too fresh OpenSSL version installed in my system and this version is not supported by Python I'm trying to build. I managed to install Python 3.4.10 on my Fedora 30 machine (has OpenSSL 1.1+ by default) using the following steps:
Temporary remove openssl-devel if it is installed as it will conflict with older version:
$ sudo dnf remove openssl-devel
Install compat OpenSSL 1.0 packages:
$ sudo dnf install compat-openssl10 compat-openssl10-devel
Build Python 3.4.10 (I use asdf but it should work with pyenv as well):
$ asdf install python 3.4.10
Remove compat library and install modern instead to be able to build something more fresh next time:
$ sudo dnf remove compat-openssl10-devel
$ sudo dnf install openssl-devel
Inspired by this workaround with help from Fedora community people.
If you use Manjaro Linux, you can use this:
sudo pacman -S openssl , check
If you are using RedHat Enterprise Linux, you can use this:
yum install openssl-devel -y
CentOS or RHEL machine Python3(3.7.0) ssl not supported as of now.
pip installation supported with Python <=3.6

Installing GNU Radio with pybombs, Cannot find a source URI for package python

I'm trying to get gnu radio installed on a virtual machine. The VM is CentOS 6.5. I used the a vagrant box for 64bit Centos 6.5 Minimal. CentOS 6.5 already has python 2.6 and it's unwise to change the default python because yum and other packages depend on it. I installed python 2.7 alongside it because I'm trying to use pybombs to install gnuradio.
Here are the changes I've made to the virtual machine in an attempt to download gnuradio:
su -
yum groupinstall -y 'development tools'
yum install -y zlib-devel bzip2-devel openssl-devel xz-libs wget
I downloaded python 2.7, unzipped, and placed in shared directory
cd to python2.7 directory
./configure --prefix=/usr/local
make
make altinstall
yum install epel-release
curl -O https://bootstrap.pypa.io/get-pip.py
python2.7 get-pip.py
pip2.7 install --upgrade setuptools
pip2.7 install PyBOMBS
pybombs recipes add gr-recipes git+https://github.com/gnuradio/gr-recipes.git
pybombs recipes add gr-etcetera git+https://github.com/gnuradio/gr-etcetera.git
pybombs prefix init /usr/local -a myprefix
pybombs -p /usr/local install gnuradio
This is the error I get:
PyBombs.install - INFO - Installing package: python
PyBombs.Packager.source - WARNING - Cannot find a source URI for package python
PyBombs.install - ERROR - Error installing package python. Aborting.
Pybombs successfully installed a few other packages before reaching this error. I'm not sure how to fix it - I'd appreciate any help.
I created the setup script for python 2.7 and CentOS 5.x. I think you can use it for CentOs 6.x:
https://github.com/weldpua2008/python-2.7.x-on-Centos-5.x/blob/master/install_python27.sh

error: command 'gcc' failed with exit status 1 while installing eventlet

I wanted to install eventlet on my system in order to have "Herd" for software deployment.. but the terminal is showing a gcc error:
root#agrover-OptiPlex-780:~# easy_install -U eventlet
Searching for eventlet
Reading http://pypi.python.org/simple/eventlet/
Reading http://wiki.secondlife.com/wiki/Eventlet
Reading http://eventlet.net
Best match: eventlet 0.9.16
Processing eventlet-0.9.16-py2.7.egg
eventlet 0.9.16 is already the active version in easy-install.pth
Using /usr/local/lib/python2.7/dist-packages/eventlet-0.9.16-py2.7.egg
Processing dependencies for eventlet
Searching for greenlet>=0.3
Reading http://pypi.python.org/simple/greenlet/
Reading https://github.com/python-greenlet/greenlet
Reading http://bitbucket.org/ambroff/greenlet
Best match: greenlet 0.3.4
Downloading http://pypi.python.org/packages/source/g/greenlet/greenlet- 0.3.4.zip#md5=530a69acebbb0d66eb5abd83523d8272
Processing greenlet-0.3.4.zip
Writing /tmp/easy_install-_aeHYm/greenlet-0.3.4/setup.cfg
Running greenlet-0.3.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-_aeHYm/greenlet-0.3.4/egg-dist-tmp-t9_gbW
In file included from greenlet.c:5:0:
greenlet.h:8:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: Setup script exited with error: command 'gcc' failed with exit status 1`
Why can't Python.h be found?
Your install is failing because you don't have the python development headers installed. You can do this through apt on ubuntu/debian with:
sudo apt-get install python-dev
for python3 use:
sudo apt-get install python3-dev
For eventlet you might also need the libevent libraries installed so if you get an error talking about that you can install libevent with:
sudo apt-get install libevent-dev
For Fedora:
sudo yum install python-devel
sudo yum install libevent-devel
and finally:
sudo easy_install gevent
What worked for me on CentOS was:
sudo yum -y install gcc
sudo yum install python-devel
For Redhat Versions(Centos 7) Use the below command to install Python Development Package
Python 2.7
sudo yum install python-dev
Python 3.4
sudo yum install python34-devel
Python 3.6
sudo yum install python36-devel
If the issue is still not resolved then try installing the below packages -
sudo yum install python-devel
sudo yum install openssl-devel
sudo yum install libffi-devel
On MacOS I had trouble installing fbprophet which requires pystan which requires gcc to compile. I would consistently get the same error: command 'gcc' failed with exit status 1
I think I fixed the problem for myself thus:
I used brew install gcc to install the newest version, which ended up being gcc-8
Then I made sure that when gcc ran it would use gcc-8 instead.
It either worked because I added alias gcc='gcc-8 in my .zshrc (same as .bashrc but for zsh), or because I ran export PATH=/usr/local/bin:$PATH (see comment)
Also: all my attempts were inside a virtual environment and I only succeeded by installing fbprophet globally (with pip), but still no success inside a venv
This is an old post but I just run to the same problem on AWS EC2 installing regex. This working perfectly for me
sudo yum -y install gcc
and next
sudo yum -y install gcc-c++
If it is still not working, you can try this
sudo apt-get install build-essential
in my case, it solved the problem.
try this :
sudo apt-get install libblas-dev libatlas-base-dev
I had a similar issue on Ubuntu 14.04. For me the following Ubuntu packages
On MacOS I also had problems trying to install fbprophet which had gcc as one of its dependencies.
After trying several steps as recommended by #Boris the command below from the Facebook Prophet project page worked for me in the end.
conda install -c conda-forge fbprophet
It installed all the needed dependencies for fbprophet. Make sure you have anaconda installed.
This page is gonna save your life, for all further lib issues that are forthcoming,
For Alpine(>=3.6), use
apk --update --upgrade add gcc musl-dev jpeg-dev zlib-dev libffi-dev cairo-dev pango-dev gdk-pixbuf-dev
For CentOS 7.2:
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.2.1511 (Core)
Release: 7.2.1511
Codename: Core
Install eventlet:
sudo yum install python-devel
sudo easy_install -ZU eventlet
Terminal info:
[root#localhost ~]# easy_install -ZU eventlet
Searching for eventlet
Reading http://pypi.python.org/simple/eventlet/
Best match: eventlet 0.19.0
Downloading https://pypi.python.org/packages/5a/e8/ac80f330a80c18113df0f4f872fb741974ad2179f8c2a5e3e45f40214cef/eventlet-0.19.0.tar.gz#md5=fde857181347d5b7b921541367a99204
Processing eventlet-0.19.0.tar.gz
Running eventlet-0.19.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Hh9GQY/eventlet-0.19.0/egg-dist-tmp-rBFoAx
Adding eventlet 0.19.0 to easy-install.pth file
Installed /usr/lib/python2.6/site-packages/eventlet-0.19.0-py2.6.egg
Processing dependencies for eventlet
Finished processing dependencies for eventlet
For openSUSE 42.1 Leap Linux use this
sudo zypper install python3-devel
I am using MacOS catalina 10.15.4. None of the posted solutions worked for me. What worked for me is:
>> xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
>> env LDFLAGS="-I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib" pip install psycopg2==2.8.4
Collecting psycopg2==2.8.4
Using cached psycopg2-2.8.4.tar.gz (377 kB)
Installing collected packages: psycopg2
Attempting uninstall: psycopg2
Found existing installation: psycopg2 2.7.7
Uninstalling psycopg2-2.7.7:
Successfully uninstalled psycopg2-2.7.7
Running setup.py install for psycopg2 ... done
Successfully installed psycopg2-2.8.4
use pip3 for python3
if you are on Mac as myself, try this in your terminal: xcode-select --install
Then accept the installation request, and it works afterwards as described in this issue
Build from source and install, this is fixed in the latest release (10.3+):
mkdir -p /tmp/install/netifaces/
cd /tmp/install/netifaces && wget -O "netifaces-0.10.4.tar.gz" "https://pypi.python.org/packages/source/n/netifaces/netifaces-0.10.4.tar.gz#md5=36da76e2cfadd24cc7510c2c0012eb1e"
tar xvzf netifaces-0.10.4.tar.gz
cd netifaces-0.10.4 && python setup.py install
Similarly I fixed it like this (notice python34):
sudo yum install python34-devel
sudo apt install gcc
It works for PyCharm on Ubuntu 20.10.
If you are migrating to a more modern version of python3 e.g. python3.5 to python3.8 You may want to check/upgrade the versions of the library that are failing if you have already installed the recommended libraries to handle gcc building python3-dev + other libraries as suggested.
It depends on the package. Some versions of the packages may not be supported on later versions of python3.

Categories