I've read in multiple places that python3.4 ships with pip. My OS is Lubuntu 14.04 and the default python version is Python 2.7.6 but in
/usr/bin
it says I have python3.4 installed (when I run python3 -V it says I have Python 3.4.0). I made this post earlier last week: How do I use pip 3 with Python 3.4?
One of the comments to the reply said that "It may be worth mentioning that python3.4 should always ship pip by default. So python3 -m pip should work out of the box. If not, there's python -m ensurepip to bootstrap pip. get-pip.py should not be necessary here."
I can confirm that I do not have pip because I did
pip -V
and it said that pip is currently not installed. I tried running
python3 -m pip
and it said
/usr/bin/python3: No module named pip
I then tried
python -m ensurepip
python3 -m ensurepip
and it said
/usr/bin/python: No module named ensurepip
/usr/bin/python3: No module named ensurepip
With that said, is there something wrong with my version of python3 because it does not have pip or ensurepip? I'm asking because I've read in multiple places (for example, in my previous question) that python3.4 comes with pip and I don't think that is true for my case.
My end goal is to run Django1.8 using python 3.4.3.
Getting Started With pip. Package management is so important that Python's installers have included pip since versions 3.4 and 2.7. 9, for Python 3 and Python 2, respectively. Many Python projects use pip , which makes it an essential tool for every Pythonista.
Key terms. pip is the preferred installer program. Starting with Python 3.4, it is included by default with the Python binary installers.
On Linux, it is in /usr/bin/pip3. While pip comes automatically installed with Python 3.4 on Windows and OS X, you must install it separately on Linux. To install pip3 on Ubuntu or Debian Linux, open a new Terminal window and enter sudo apt-get install python3-pip .
On Ubuntu and other Debian derivatives you have to install python3-pip
to get Python3’s pip.
apt-get install python3-pip
You can try below code for pip installation on Ubuntu.
sudo apt update
sudo apt install python3-pip
On Ubuntu Focal/20.04, got the same error
❯ python3 -m ensurepip --upgrade
/usr/bin/python3: No module named ensurepip
It looks like it's disable for system python as described by Python2 interpreter output:
❯ python2 -m ensurepip --upgrade
ensurepip is disabled in Debian/Ubuntu for the system python.
Python modules For the system python are usually handled by dpkg and apt-get.
apt-get install python-<module name>
Install the python-pip package to use pip itself. Using pip together
with the system python might have unexpected results for any system installed
module, so use it on your own risk, or make sure to only use it in virtual
environments.
Use apt
to install it:
apt install python3-pip
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With