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.
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.
sudo
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
OpenSuse , . , -, , -, . OpenSuse, https://en.opensuse.org/Package_repositories, pip.
- , 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
,
, python.
, python. import sys, os; print os.sep.join([sys.prefix, 'lib', 'python' + sys.version[:3], 'site-packages']);
import sys, os; print os.sep.join([sys.prefix, 'lib', 'python' + sys.version[:3], 'site-packages'])
requests, import requests . python, .
requests
import requests
import sys sys.path.append("<path>")
- 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
Source: https://habr.com/ru/post/1610833/More articles:Django Select_related () chain - djangoDouble-sided folder synchronization with robocopy - batch-fileSpring boot application: doesn't compile application.properties? - javaMerge 2 lists based on one property and merge other properties - c #RailsAdmin - preventing N + 1 requests through includes - ruby-on-rails-4GNU Automake - ΡΠΎΠ·Π΄Π°Π½ΠΈΠ΅ Π΄ΠΈΠ½Π°ΠΌΠΈΡΠ΅ΡΠΊΠΈΡ Π±ΠΈΠ±Π»ΠΈΠΎΡΠ΅ΠΊ, ΡΡΠ°ΡΠΈΡΠ΅ΡΠΊΠΈ ΡΠ²ΡΠ·Π°Π½Π½ΡΡ Ρ Π΅Π³ΠΎ Π·Π°Π²ΠΈΡΠΈΠΌΠΎΡΡΡΠΌΠΈ - c++How to find missing columns, constraints, indexes in a database compared to others - c #outofmemory error in grails run-app - out-of-memoryHow to make LibGDX GLSurfaceView transparent so that we can see the Android ImageView behind it? - androidWrong keyboard height after rotation - iosAll Articles