I feel like I’m missing some groundwork/basics on how to ensure the pip installs /module loading is setup to run correctly and wanted to ask for some guidance. Here is a specific example:
Traceback (most recent call last):
File "c:UsersatfleDocumentsVSCode FilesPython Strategies.venvwebpage_to_pdf_and_python.py", line 1, in <module>
import pdfkit
ModuleNotFoundError: No module named 'pdfkit'
PS C:UsersatfleDocumentsVSCode FilesPython Strategies> pip install pdfkit
Requirement already satisfied: pdfkit in c:usersatfleappdatalocalpackagespythonsoftwarefoundation.python.3.11_qbz5n2kfra8p0localcachelocal-packagespython311site-packages (1.0.0)
I’ve got that exact file path in the requirement satisfied line added to System Variables PATH (I’m on Windows) and still no luck here. Any guidance would be appreciated.
I am trying to run python files but can’t find consistency with modules I’ve installed and used previously in VS code.
Drew Fleming is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
5
Check your current python environment, hover the terminal like this:
If you have Global it environment it should show you like this:
Global Environment
and if it’s Local it should be like this: Local Environment
Now see if the current interpreter for python is the same as the one your installing your pdfkit
package.
For windows
- Press CTRL + Shift + P
- Select Python interpreter
- Choose the interpreter you’ve currently installed your
pdfkit
package in. From the given information I think it’s Global.
Rana Adeel Tahir is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1