简体   繁体   English

正确安装pyPDF2时导入错误

[英]Import error in pyPDF2 when it is correctly installed

I am using python 2.7.6 on Ubuntu 14.04 LTS. 我在Ubuntu 14.04 LTS上使用python 2.7.6。 When I run this command: 当我运行此命令时:

sudo pip install pypdf2

The following message shows up: 显示以下消息:

Requirement already satisfied (use --upgrade to upgrade): 
pypdf2 in /usr/local/lib/python2.7/dist-packages
Cleaning up...

This means that pypdf2 is already installed on my system but when I try to import pyPDF2, this message comes up: 这意味着pypdf2已经安装在我的系统上,但是当我尝试导入pyPDF2时,会出现以下消息:

>>> import pyPDF2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named pyPDF2

Capitalization counts. 资本化很重要。 Try import PyPDF2 and see if that works. 尝试import PyPDF2 ,看看是否有效。

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

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