Hi All,
I am having trouble installing and importing Python packages in Alteryx Designer 2021.3 x64. The packages seem to install correctly but I can't import them into my workflow. Can someone please help me with this? A sample error is below:
Package.installPackages(['pyPdf2'], install_type="install --user --upgrade --force-reinstall")
from pyPdf2 import PdfFileReader
Looking in indexes: "web address"
Collecting pyPdf2
Using cached "web address - get .whl file"
Installing collected packages: pyPdf2
Successfully installed pyPdf2-1.27.3
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-2-f9764ecfff5f> in <module>
3
4 Package.installPackages(['pyPdf2'], install_type="install --user --upgrade --force-reinstall")
----> 5 from pyPdf2 import PdfFileReader
ModuleNotFoundError: No module named 'pyPdf2'
Solved! Go to Solution.
I think the case matters when importing modules. Try,
from PyPDF2 import PdfFileReader
Not sure how I overlooked this, but your answer is perfect. Thanks!