Python 3.4 pip 安装 [英] Python 3.4 pip install
问题描述
我正在尝试在我的 Mac 上安装 xlrd
模块,但是当我打开 IDLE
并导入 xlrd
模块时,我得到错误:
I am trying to install the xlrd
module on my Mac, however when I open IDLE
and import the xlrd
module, I get the error:
Input Error: No module named xlrd
要安装它,我在我的主目录中使用...
To install it, I used in my home directory...
sudo pip install xlrd
... 安装成功.
请注意,我的计算机上同时安装了 Python 2.7 和 Python 3.4.0,以防这是导致问题的原因.我想为 Python 3.4.0 安装它.
Note that I have both Python 2.7 and Python 3.4.0 on my computer, in case this is what is causing problems. I want it installed for Python 3.4.0.
推荐答案
为了避免并行 Python 2 和 Python 3 之间的冲突安装,只有版本化的 pip3 和 pip3.4 命令是默认自举
To avoid conflicts between parallel Python 2 and Python 3 installations, only the versioned pip3 and pip3.4 commands are bootstrapped by default
您可以尝试 sudo pip3 install xlrd
或 sudo pip3.4 install xlrd
以使用 Python 3.4,请参阅此处的文档 https://docs.python.org/3/whatsnew/3.4.html#bootstrapping-pip-by-默认
You can try sudo pip3 install xlrd
or sudo pip3.4 install xlrd
to use the Python 3.4, see docs here https://docs.python.org/3/whatsnew/3.4.html#bootstrapping-pip-by-default
这篇关于Python 3.4 pip 安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!