Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
can't use pip on CentOS 7
#1
Greeting.
When I tried to use any pip commands it occured following error:
Output:
Traceback (most recent call last): File "/usr/bin/pip", line 9, in <module> load_entry_point('pip==8.1.2', 'console_scripts', 'pip')() File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point return ep.load() File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2443, in load return self.resolve() File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2449, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/usr/lib/python2.7/site-packages/pip/__init__.py", line 15, in <module> from pip.vcs import git, mercurial, subversion, bazaar # noqa File "/usr/lib/python2.7/site-packages/pip/vcs/mercurial.py", line 9, in <module> from pip.download import path_to_url File "/usr/lib/python2.7/site-packages/pip/download.py", line 39, in <module> from pip._vendor import requests, six File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/__init__.py", line 53, in <module> from .packages.urllib3.contrib import pyopenssl File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py", line 54, in <module> import OpenSSL.SSL File "/usr/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module> from OpenSSL import crypto, SSL File "/usr/lib/python2.7/site-packages/OpenSSL/crypto.py", line 15, in <module> from OpenSSL._util import ( File "/usr/lib/python2.7/site-packages/OpenSSL/_util.py", line 152, in <module> with ffi.from_buffer(b""): TypeError: from_buffer() cannot return the address of the raw string within a str or unicode or bytearray object
I tried to reinstall pip by these commands but they didn’t work.
Quote:yum remove python-pip
yum install python-pip
Any help would be appreciated.
Reply
#2
centos 7 is not python.
from their docs:
Quote:CentOS Linux is a rebuild of the freely available sources for Red Hat Enterprise Linux (RHEL).
you can download here: https://www.centos.org/download/
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python to interact with the Linux Command Line - Centos/RHEL redhat_boy 2 2,160 May-10-2020, 08:33 AM
Last Post: redhat_boy
  virtual environment is not activating in centOS Anu 5 3,494 Dec-16-2019, 10:48 AM
Last Post: Anu

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020