Python 如何使用 pip 安装 Openpyxl
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/38364404/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to install Openpyxl with pip
提问by Enigmatic Wang
I have windows 10 (64 bit). I want to utilize the Openpyxl
package to start learning how to interact with excel and other spreadsheets.
我有 Windows 10(64 位)。我想利用该Openpyxl
包开始学习如何与 excel 和其他电子表格进行交互。
I installed Python with "windowsx86-64web-basedinstaller"
I have a 64 bit OS, was I mistaken when trying to install this version?
我"windowsx86-64web-basedinstaller"
在 64 位操作系统上安装了 Python,我在尝试安装这个版本时搞错了吗?
回答by KoolAid
You need to ensure that C:\Python35\Sripts
is in your system path. Follow the top answer instructions hereto do that:
您需要确保它C:\Python35\Sripts
在您的系统路径中。按照此处的最佳答案说明执行此操作:
You run the command in windows command prompt, not in the python interpreter that you have open.
您在 Windows 命令提示符下运行该命令,而不是在您打开的 python 解释器中运行。
Press:
按:
Win+ R
Win+ R
Type CMD
in the run window which has opened
键入CMD
其中已开通运行窗口
Type pip install openpyxl
in windows command prompt.
键入pip install openpyxl
windows 命令提示符。
回答by user7444749
I had to do: c:\Users\xxxx>c:/python27/scripts/pip install openpyxl
I had to save the openpyxl files in the scripts folder.
我必须这样做:c:\Users\xxxx>c:/python27/scripts/pip install openpyxl
我必须将 openpyxl 文件保存在脚本文件夹中。
回答by Haha TTpro
(optional) Install git for windows(https://git-scm.com/) to get git bash. Git bash is much more similar to Linux terminal than Windows cmd.
(可选)安装 git for windows( https://git-scm.com/) 以获取 git bash。Git bash 比 Windows cmd 更类似于 Linux 终端。
Install Anaconda 3
安装蟒蛇 3
https://www.anaconda.com/download/
It should set itself into Windows PATH. Restart your PC. Then pip should work in your cmd
它应该将自己设置为 Windows PATH。重新启动您的电脑。然后 pip 应该在你的 cmd 中工作
Then in cmd (or git bash), run command
然后在 cmd(或 git bash)中,运行命令
pip install openpyxl
回答by Don Gonzalo Cortez Mayer
- Go to https://pypi.org/project/openpyxl/#files
- Download the file and unzip in your pc in the main folder, there's a file call setup.py
- Install with this command: python setup.py install
- 转到https://pypi.org/project/openpyxl/#files
- 下载文件并解压到你电脑的主文件夹中,有一个名为 setup.py 的文件
- 使用以下命令安装:python setup.py install
回答by Kumar Jaggal
- https://pypi.python.org/pypi/openpyxldownload zip file and unzip it on local system.
- go to openpyxl folder where setup.py is present.
- open command prompt under the same path.
- Run a command: python setup.py install
- It will install openpyxl.
- https://pypi.python.org/pypi/openpyxl下载 zip 文件并在本地系统上解压。
- 转到存在 setup.py 的 openpyxl 文件夹。
- 在同一路径下打开命令提示符。
- 运行命令:python setup.py install
- 它将安装 openpyxl。