问题描述
我在多个地方读到 python3.4 附带 pip.我的操作系统是 Lubuntu 14.04,默认的 Python 版本是 Python 2.7.6 但在
/usr/bin
它说我安装了 python3.4(当我运行 python3 -V 时它说我安装了 Python 3.4.0).我上周早些时候发表了这篇文章:如何在 Python 3.4 中使用 pip 3?>
回复中的一个评论说值得一提的是,python3.4 应该总是默认发送 pip.所以 python3 -m pip 应该开箱即用.如果没有,有 python -m ensurepip 到bootstrap pip.这里不需要 get-pip.py."
我可以确认我没有 pip,因为我有
pip -V
它说当前没有安装pip.我试过跑步
python3 -m pip
它说
/usr/bin/python3: 没有名为 pip 的模块
然后我尝试了
python -m ensurepippython3 -m ensurepip
它说
/usr/bin/python: 没有名为 ensurepip 的模块/usr/bin/python3: 没有名为 ensurepip 的模块
话虽如此,我的python3版本是否有问题,因为它没有pip或ensurepip?我问是因为我在多个地方(例如,在我之前的问题中)读到 python3.4 附带 pip,我认为这对我的情况不正确.
我的最终目标是使用 python 3.4.3 运行 Django1.8.
在 Ubuntu 和其他 Debian 衍生产品上,您必须安装 python3-pip
才能获得 Python3 的 pip.
apt-get install python3-pip
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.
On Ubuntu and other Debian derivatives you have to install python3-pip
to get Python3’s pip.
apt-get install python3-pip
这篇关于我有 python3.4 但没有 pip 或 ensurepip .. 我的 python3.4 版本有问题吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!