[英]Unable to import PyPDF2 after installing
I have installed PyPDF2 via pip3 install PyPDF2.我已经通过 pip3 install PyPDF2 安装了 PyPDF2。 The installation was successful.
安装成功。 I am trying to import into Python unsuccessfully, and I do not know what is going on!
我试图导入Python失败,我不知道发生了什么! I am using Python 3.7
我正在使用 Python 3.7
After entering: from PyPDF2 import PdfFileReader输入后: from PyPDF2 import PdfFileReader
The following is what happens:以下是发生的情况:
Traceback (most recent call last):
回溯(最近一次调用最后一次):
File " < stdin >", line 1, in < module >
文件“<stdin>”,第1行,<module>
ModuleNotFoundError: No module named 'PyPDF2'
ModuleNotFoundError:没有名为“PyPDF2”的模块
I am wondering maybe the PyPDF2 was installed in the wrong folder.我想知道 PyPDF2 可能安装在错误的文件夹中。 The current folder it is in: ..\\LocalCache\\local-packages\\Python37\\site-packages
它所在的当前文件夹:..\\LocalCache\\local-packages\\Python37\\site-packages
try installing by:尝试通过以下方式安装:
python3.7 -m pip install PyPDF2
python3.7
>>> import PyPDF2
To install this on windows using python 3.7 you must:要使用 python 3.7 在 Windows 上安装它,您必须:
tar.gz
file from the PyPDF websitetar.gz
文件 After that enter pip install PyPDF2 and ta-da.之后输入 pip install PyPDF2 和 ta-da。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.