/ usr / local / bin / python: no module named pip

I installed pip, but if I try to install the package with

python -m pip install requests

it says

/usr/local/bin/python: No module named pip

I am new to linux and I have no idea how to figure out where the problem is.

+4
source share
6 answers

My situation is that python3 works fine, but pip3 doesn't work (the standard version of python is python2.7, but that doesn't matter). I solve this problem with the following command:

apt-get purge -y python3-pip
apt-get install python3-pip

And if you are not a root user, you may need to add sudoat the beginning of the command. Hope this helps.

+2
source

Pip - python, python. / python, pip -

    sudo apt-get install python-setuptools
    sudo easy_install pip
    sudo apt-get update
    which pip //to check pip install or not
    pip install requests
+1

OpenSuse , . , -, , -, . OpenSuse, https://en.opensuse.org/Package_repositories, pip.

0

- , Digital Ocean, Ubuntu 14.04.05

apt-get install python-setuptools
easy_install pip
apt-get install python3-dev
pip install --upgrade setuptools
pip install cryptography
pip install paramiko

,

0

, python.

, python. import sys, os; print os.sep.join([sys.prefix, 'lib', 'python' + sys.version[:3], 'site-packages']);

requests, import requests . python, .

import sys
sys.path.append("<path>")
-1

- python. @Soroosh https://askubuntu.com/questions/324202/dpkg-error-processing-python-minimal-configure. , . 5 .

sudo su
for pkg in $(dpkg --get-selections | egrep -v 'deinstall' | egrep python | awk '{print $1}'); do  apt-get -y --force-yes install --reinstall $pkg ; done
-1

Source: https://habr.com/ru/post/1610833/


All Articles