如何使用Windows安装pyPDF2模块? [英] How do I install pyPDF2 module using windows?

查看:469
本文介绍了如何使用Windows安装pyPDF2模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为一个新手...我在安装pyPDF2模块时遇到了困难.我已经下载了.我在哪里以及如何安装(setup.py),以便可以在python解释器中使用模块?

As a newbie... I am having difficulties installing pyPDF2 module. I have downloaded. Where and how do I install (setup.py) so I can use module in python interpreter?

推荐答案

要在Windows下安装setup.py文件,可以使用以下命令行选择此方式:

To install setup.py files under Windows you can choose this way with the command line:

  1. 点击Windows键
  2. 输入cmd
  3. 执行命令行(黑色窗口)
  4. 键入cd C:\Users\User\Downloads\pyPDF2进入setup.py所在的目录(如果我下载了该目录,则为我的目录).可以从资源管理器窗口复制路径.
  5. 键入dir现在,您应该在所有内容列表中看到名称setup.py
  6. 类型C:\python27\python.exe setup.py install我在这里使用Python2.7.将C:\python33\python.exe setup.py install用于python 3.3等.如果愿意,可以立即按照以下说明进行操作: http://docs.python.org/2/install/index. html
  1. hit windows key
  2. type cmd
  3. excute the command line (black window)
  4. type cd C:\Users\User\Downloads\pyPDF2 to go into the directory where the setup.py is (this is mine if I downloaded it) The path can be copied from the explorer window.
  5. type dir now you should see the name setup.py in the listing of all contents
  6. type C:\python27\python.exe setup.py install I use Python2.7 here. Use C:\python33\python.exe setup.py install for python 3.3 and so on. You can follow these instructions now if you wish: http://docs.python.org/2/install/index.html

出现问题时不显示的另一种方法是:

Another way, that does not show when there are problems, is:

  1. 创建setup.py
  2. 的快捷方式
  3. 打开快捷方式的属性.应该有这样的路径:C:\Users\User\Downloads\pyPDF2\setup.py(这是我的setup.py所在的位置)
  4. 您可以通过以下方式修改该路径:

  1. create a shortcut to setup.py
  2. open the properties of the shortcut. There should be a path like this: C:\Users\User\Downloads\pyPDF2\setup.py (this is where my setup.py is)
  3. you modify that path in the following way:

"C:\Users\User\Downloads\pyPDF2\setup.py" install

如果路径名中有空格,则"很重要

The " are important if you have white spaces in the path name

在所有情况下,您可能都需要重新启动python才能导入模块.

In all cases you may need to restart your python to be able to import the module.

执行此操作后,您还可以在解决方案中同时贴上其他寻找它的新手的图片.

When you do this feel free to post your solution also with pictures for other newbies looking for it.

这篇关于如何使用Windows安装pyPDF2模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆