简体   繁体   English

Python 3.4 pip安装

[英]Python 3.4 pip install

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: 我试图在Mac上安装xlrd模块,但是当我打开IDLE并导入xlrd模块时,出现错误:

Input Error: No module named xlrd

To install it, I used in my home directory... 要安装它,我在主目录中使用了...

sudo pip install xlrd 

... and it is installed successfully. ...并且已成功安装。

Note that I have both Python 2.7 and Python 3.4.0 on my computer, in case this is what is causing problems. 请注意,如果这是引起问题的原因,则我的计算机上同时装有Python 2.7和Python 3.4.0。 I want it installed for Python 3.4.0. 我想要为Python 3.4.0安装它。

To avoid conflicts between parallel Python 2 and Python 3 installations, only the versioned pip3 and pip3.4 commands are bootstrapped by default 为了避免并行Python 2和Python 3安装之间的冲突,默认情况下仅引导版本化的pip3和pip3.4命令

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 您可以尝试sudo pip3 install xlrdsudo pip3.4 install xlrd以使用Python 3.4,请参阅此处的文档https://docs.python.org/3/whatsnew/3.4.html#bootstrapping-pip-by-default

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM